Sha256: ff141d8414d98abd21e86aa9b281206949708887e4df3d7bceb588dee3850e18
Contents?: true
Size: 812 Bytes
Versions: 41
Compression:
Stored size: 812 Bytes
Contents
var TYPE = require('../../tokenizer').TYPE; var LEFTPARENTHESIS = TYPE.LeftParenthesis; var RIGHTPARENTHESIS = TYPE.RightParenthesis; module.exports = { name: 'Parentheses', structure: { children: [[]] }, parse: function(readSequence, recognizer) { var start = this.scanner.tokenStart; var children = null; this.eat(LEFTPARENTHESIS); children = readSequence.call(this, recognizer); if (!this.scanner.eof) { this.eat(RIGHTPARENTHESIS); } return { type: 'Parentheses', loc: this.getLocation(start, this.scanner.tokenStart), children: children }; }, generate: function(node) { this.chunk('('); this.children(node); this.chunk(')'); } };
Version data entries
41 entries across 31 versions & 9 rubygems