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.

18 lines
421 B

4 years ago
  1. var STRING = require('../../tokenizer').TYPE.String;
  2. module.exports = {
  3. name: 'String',
  4. structure: {
  5. value: String
  6. },
  7. parse: function() {
  8. return {
  9. type: 'String',
  10. loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  11. value: this.consume(STRING)
  12. };
  13. },
  14. generate: function(node) {
  15. this.chunk(node.value);
  16. }
  17. };