ng-typeview
Advanced tools
Comparing version
@@ -54,3 +54,5 @@ "use strict"; | ||
CodegenHelper.prototype.declareVariable = function (type, val) { | ||
if (val.length > 0) { | ||
// if there are embedded {{}} blocks, ignore this and we'll grab them | ||
// in the html source in general through other means. | ||
if (val.length > 0 && val.indexOf("{{") < 0) { | ||
return "const " + this.getNewVariableName() + ": " + type + " = " + this.addScopeAccessors(val) + ";"; | ||
@@ -93,2 +95,5 @@ } | ||
exports.parseAtom = parseAtom; | ||
function parseNgExpr() { | ||
return P.string("{{").then(P.lazy(parseExpr)).skip(P.string("}}")); | ||
} | ||
function parseArithmeticOperator() { | ||
@@ -123,3 +128,4 @@ return keyword("+").or(keyword("-")).or(keyword("*")).or(keyword("/")); | ||
function parseExpr() { | ||
return parseTernary() | ||
return parseNgExpr() | ||
.or(parseTernary()) | ||
.or(parseBinaryOperations()) | ||
@@ -126,0 +132,0 @@ .or(parseString()) |
{ | ||
"name": "ng-typeview", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "library to enable type-checking of angular views when using typescript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
166117
0.34%2257
0.27%