Urara-Blog/node_modules/.pnpm-store/v3/files/d3/a0dce96acf55033bb1ddaad0973638870d46856f2acb08bf8dcba5ff96e76a025c3e046022f4f55a0afc417a65b90ec95ced68e04b154bd2c60a11fbcee6c7
2022-08-14 01:14:53 +08:00

18 lines
376 B
Text

import { Ident } from '../../tokenizer/index.js';
export const name = 'Identifier';
export const structure = {
name: String
};
export function parse() {
return {
type: 'Identifier',
loc: this.getLocation(this.tokenStart, this.tokenEnd),
name: this.consume(Ident)
};
}
export function generate(node) {
this.token(Ident, node.name);
}