astro-ghostcms/.pnpm-store/v3/files/d3/a0dce96acf55033bb1ddaad0973...

19 lines
376 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
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);
}