add parser util addExtra method
This commit is contained in:
parent
bf841c7e27
commit
e8fa03ea1c
@ -8,6 +8,15 @@ const pp = Parser.prototype;
|
||||
|
||||
// TODO
|
||||
|
||||
pp.addExtra = function (node, key, val) {
|
||||
if (!node) return;
|
||||
|
||||
var extra = node.extra = node.extra || {};
|
||||
extra[key] = val;
|
||||
};
|
||||
|
||||
// TODO
|
||||
|
||||
pp.isRelational = function (op) {
|
||||
return this.match(tt.relational) && this.state.value === op;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user