Commit bc3cad20 by Torkel Ödegaard

integrated parser into graphite target editor

parent dd902d5a
...@@ -32,7 +32,7 @@ function (angular, _, config, graphiteFunctions, Parser) { ...@@ -32,7 +32,7 @@ function (angular, _, config, graphiteFunctions, Parser) {
if (astNode.type === 'function') { if (astNode.type === 'function') {
var innerFunc = {}; var innerFunc = {};
innerFunc.def = _.findWhere($scope.funcDefs, { name: astNode.name }) innerFunc.def = _.findWhere($scope.funcDefs, { name: astNode.name });
innerFunc.params = innerFunc.def.defaultParams; innerFunc.params = innerFunc.def.defaultParams;
_.each(astNode.params, function(param, index) { _.each(astNode.params, function(param, index) {
......
...@@ -577,7 +577,7 @@ define([ ...@@ -577,7 +577,7 @@ define([
* var str = "hello\ * var str = "hello\
* world"; * world";
*/ */
scanStringLiteral: function (checks) { scanStringLiteral: function () {
/*jshint loopfunc:true */ /*jshint loopfunc:true */
var quote = this.peek(); var quote = this.peek();
...@@ -587,8 +587,6 @@ define([ ...@@ -587,8 +587,6 @@ define([
} }
var value = ""; var value = "";
var startLine = this.line;
var startChar = this.char;
this.skip(); this.skip();
......
...@@ -11,11 +11,6 @@ define([ ...@@ -11,11 +11,6 @@ define([
StringLiteral: 6 StringLiteral: 6
}; };
function Node(type, value) {
this.type = type;
this.value = value;
}
function Parser(expression) { function Parser(expression) {
this.expression = expression; this.expression = expression;
this.lexer = new Lexer(expression); this.lexer = new Lexer(expression);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment