No description provided.
Parser doesn't know them. This needs an overhaul of lexer and/or token structure.
fixed ops as functions for instanceof, import, in, their negation, etc.
eg. (not in [1 to 5]) 7 #=> true - closes #35, closes #36
lexer.co outputs tokens in the form [TAG, value, lineNumber], which is converted to jison variables in by coco.co:
[TAG, value, lineNumber]
yy : require \./ast
lex : -> [tag, @yytext, @yylineno] = @tokens[++@pos] or ['']; tag
setInput : -> @pos = -1; @tokens = it
upcomingInput : -> ''
grammar.co passes yylineno to certain rules with the L function:
o \ID -> Chain L Var $1
case 1:this.$ = yy.Chain(yy.L(yylineno, yy.Var($$[$0])));
where L is defined in ast.co:
exports.L = (yylineno, node) -> node import line: yylineno + 1
The default lexer for jison keeps track of column location in yylloc, per the bison spec. See also zaach/jison#59
Thus, for column numbers, the following needs to be done:
[TAG, value, lineNo, colStart, colEnd]
Those steps will propogate column numbers far enough to allow carp compile-time errors to have column information.