You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
482 B

4 years ago
  1. // '/' | '*' | ',' | ':' | '+' | '-'
  2. module.exports = {
  3. name: 'Operator',
  4. structure: {
  5. value: String
  6. },
  7. parse: function() {
  8. var start = this.scanner.tokenStart;
  9. this.scanner.next();
  10. return {
  11. type: 'Operator',
  12. loc: this.getLocation(start, this.scanner.tokenStart),
  13. value: this.scanner.substrToCursor(start)
  14. };
  15. },
  16. generate: function(node) {
  17. this.chunk(node.value);
  18. }
  19. };