Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
542 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var TYPE = require('../../tokenizer').TYPE;
|
---|
| 2 |
|
---|
| 3 | var HASH = TYPE.Hash;
|
---|
| 4 |
|
---|
| 5 | // '#' ident
|
---|
| 6 | module.exports = {
|
---|
| 7 | name: 'Hash',
|
---|
| 8 | structure: {
|
---|
| 9 | value: String
|
---|
| 10 | },
|
---|
| 11 | parse: function() {
|
---|
| 12 | var start = this.scanner.tokenStart;
|
---|
| 13 |
|
---|
| 14 | this.eat(HASH);
|
---|
| 15 |
|
---|
| 16 | return {
|
---|
| 17 | type: 'Hash',
|
---|
| 18 | loc: this.getLocation(start, this.scanner.tokenStart),
|
---|
| 19 | value: this.scanner.substrToCursor(start + 1)
|
---|
| 20 | };
|
---|
| 21 | },
|
---|
| 22 | generate: function(node) {
|
---|
| 23 | this.chunk('#');
|
---|
| 24 | this.chunk(node.value);
|
---|
| 25 | }
|
---|
| 26 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.