Skip to content

Commit

Permalink
release 0.4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ichiriac committed Feb 16, 2019
1 parent dacf670 commit 11a5e73
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 81 deletions.
14 changes: 11 additions & 3 deletions dist/doc-parser.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! doc-parser - BSD3 License - 2017-03-12 */
/*! doc-parser - BSD3 License - 2019-02-16 */

require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/docblock-parser/graphs/contributors
Expand Down Expand Up @@ -504,6 +504,10 @@ Parser.prototype.parseAnnotation = function () {
Parser.prototype.parseMethodArguments = function () {
var result = [];
var item;
if (this.token === ')') {
this.token = this.lexer.lex();
return result;
}
do {
item = this.parseTopStatement();
if (item !== null) {
Expand Down Expand Up @@ -861,6 +865,10 @@ Parser.prototype.parseStatement = function () {
Parser.prototype.readArray = function (endChar) {
var result = [];
this.token = this.lexer.lex(); // consume start char
if (this.token === endChar) {
this.token = this.lexer.lex();
return result;
}
do {
var item = this.parseTopStatement();
if (item !== null) { // ignore
Expand Down Expand Up @@ -964,7 +972,7 @@ module.exports = {
T_NUM: 5
};

},{}],"docblock-parser":[function(require,module,exports){
},{}],"doc-parser":[function(require,module,exports){
/*!
* Copyright (C) 2017 Glayzzle (BSD3 License)
* @authors https://github.com/glayzzle/docblock-parser/graphs/contributors
Expand Down
27 changes: 14 additions & 13 deletions dist/doc-parser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/doc-parser.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

**Properties**

- `token` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `token` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
- `lexer` **Lexer**
- `parser` **Parser**

Expand All @@ -20,4 +20,4 @@ Parsing the specified input

- `input`

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** AST
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** AST
60 changes: 0 additions & 60 deletions docs/lexer.md
Original file line number Diff line number Diff line change
@@ -1,61 +1 @@
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## Lexer

**Parameters**

- `tokens`

**Properties**

- `text` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Current parsed text (attached to current token)
- `offset` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Current offset
- `token` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number))** Current parsed token

### read

Initialize the lexer with specified text

**Parameters**

- `input`

### input

Consumes a char

Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**

### unput

Revert back the current consumed char

Returns **void**

### unlex

Revert back the current consumed token

**Parameters**

- `state`

Returns **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number))** the previous token

### state

Revert back the current consumed token

Returns **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number))** the previous token

### lex

Consumes the next token (ignores whitespaces)

Returns **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number))** the current token

### next

Eats a token (see lex for public usage) including whitespace

Returns **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number))** the current token
2 changes: 1 addition & 1 deletion docs/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Parses the specified input

- `input`

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** AST
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** AST

### parseAnnotation

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doc-parser",
"version": "0.4.8",
"version": "0.4.9",
"description": "Parses docblocks comments",
"main": "src/index.js",
"scripts": {
Expand Down

0 comments on commit 11a5e73

Please sign in to comment.