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 NUMBER = require('../../tokenizer').TYPE.Number;
  2. module.exports = {
  3. name: 'Number',
  4. structure: {
  5. value: String
  6. },
  7. parse: function() {
  8. return {
  9. type: 'Number',
  10. loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  11. value: this.consume(NUMBER)
  12. };
  13. },
  14. generate: function(node) {
  15. this.chunk(node.value);
  16. }
  17. };