Operator.js 410 B

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