Skip to content

Commit

Permalink
refactor(docblock): start adding docblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Mar 30, 2017
1 parent dfb7d46 commit 7c82148
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/Ast/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ const closingHtmlComment = /(--}}$)/
*/
const singleLineComment = /({{--.*?--}})/g

/**
* Ast parser generates a syntax tree for the template files.
* This is 1st step in the process of compiling a template.
* Since this class understands the concepts of edge tags,
* it will create a tree with nested tags and their
* childs.
*
* @class Ast
* @constructor
* @module Compiler
*/
class Ast {
constructor (tags, blockExpression) {
this._tags = tags
Expand Down Expand Up @@ -77,7 +88,7 @@ class Ast {

/**
* Returns the token for a line. Also it will
* parse the inline comments on a given line
* reomve the inline comments on a given line
*
* @method _tokenForLine
*
Expand Down Expand Up @@ -139,8 +150,6 @@ class Ast {
*
* @return {Boolean}
*
* @throws {Error} If there are unclosed block level tags
*
* @private
*/
_isClosingTag (lastTag, line) {
Expand Down Expand Up @@ -191,6 +200,8 @@ class Ast {
* @method parse
*
* @return {Array}
*
* @throws {InvalidTemplateException} If there are unclosed tags found
*/
parse (template) {
template
Expand Down

0 comments on commit 7c82148

Please sign in to comment.