String.js 421 B

123456789101112131415161718
  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. };