Operator.cjs 502 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. // '/' | '*' | ',' | ':' | '+' | '-'
  3. const name = 'Operator';
  4. const structure = {
  5. value: String
  6. };
  7. function parse() {
  8. const start = this.tokenStart;
  9. this.next();
  10. return {
  11. type: 'Operator',
  12. loc: this.getLocation(start, this.tokenStart),
  13. value: this.substrToCursor(start)
  14. };
  15. }
  16. function generate(node) {
  17. this.tokenize(node.value);
  18. }
  19. exports.generate = generate;
  20. exports.name = name;
  21. exports.parse = parse;
  22. exports.structure = structure;