|
|
@ -13,19 +13,6 @@ function StateCore(src, md, env) { |
|
|
|
this.md = md; // link to parser instance
|
|
|
|
} |
|
|
|
|
|
|
|
// Push new token to "stream".
|
|
|
|
//
|
|
|
|
StateCore.prototype.push = function (type, tag, nesting) { |
|
|
|
var token = new Token(type, tag, nesting); |
|
|
|
|
|
|
|
if (nesting < 0) { this.level--; } |
|
|
|
token.level = this.level; |
|
|
|
if (nesting > 0) { this.level++; } |
|
|
|
|
|
|
|
this.tokens.push(token); |
|
|
|
return token; |
|
|
|
}; |
|
|
|
|
|
|
|
// re-export Token class to use in core rules
|
|
|
|
StateCore.prototype.Token = Token; |
|
|
|
|
|
|
|