Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- console.log(tmp.tok);
- console.log('~~~~~~~~~');
- this.tokens.push(tmp.tok);
- console.log(this.tokens);
- console.log('=========');
- ... and the output:
- { type: 0, match: 'int', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 0, match: 'int', val: null, print: [Function] } ]
- =========
- { type: 9, match: ' ', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] } ]
- =========
- { type: 0, match: 'main', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 0, match: 'main', val: null, print: [Function] },
- { type: 0, match: 'main', val: null, print: [Function] },
- { type: 0, match: 'main', val: null, print: [Function] } ]
- =========
- { type: 48, match: '(', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 48, match: '(', val: null, print: [Function] },
- { type: 48, match: '(', val: null, print: [Function] },
- { type: 48, match: '(', val: null, print: [Function] },
- { type: 48, match: '(', val: null, print: [Function] } ]
- =========
- { type: 49, match: ')', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 49, match: ')', val: null, print: [Function] },
- { type: 49, match: ')', val: null, print: [Function] },
- { type: 49, match: ')', val: null, print: [Function] },
- { type: 49, match: ')', val: null, print: [Function] },
- { type: 49, match: ')', val: null, print: [Function] } ]
- =========
- { type: 45, match: ':', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 45, match: ':', val: null, print: [Function] },
- { type: 45, match: ':', val: null, print: [Function] },
- { type: 45, match: ':', val: null, print: [Function] },
- { type: 45, match: ':', val: null, print: [Function] },
- { type: 45, match: ':', val: null, print: [Function] },
- { type: 45, match: ':', val: null, print: [Function] } ]
- =========
- { type: 56, match: '\n', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] } ]
- =========
- { type: 9, match: ' ', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] } ]
- =========
- { type: 0, match: 'return', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] },
- { type: 0, match: 'return', val: null, print: [Function] } ]
- =========
- { type: 9, match: ' ', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] } ]
- =========
- { type: 4, match: '2', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] },
- { type: 4, match: '2', val: null, print: [Function] } ]
- =========
- { type: 9, match: ' ', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] } ]
- =========
- { type: 30, match: '+', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] },
- { type: 30, match: '+', val: null, print: [Function] } ]
- =========
- { type: 9, match: ' ', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] },
- { type: 9, match: ' ', val: null, print: [Function] } ]
- =========
- { type: 6, match: '0x2', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] },
- { type: 6, match: '0x2', val: null, print: [Function] } ]
- =========
- { type: 56, match: '\n', val: null, print: [Function] }
- ~~~~~~~~~
- [ { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] } ]
- =========
- [ { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] },
- { type: 56, match: '\n', val: null, print: [Function] } ]
Advertisement
Add Comment
Please, Sign In to add comment