@artemis-lang/parser
Version:
The artemis language parser
17 lines (14 loc) • 364 B
text/typescript
import NodeTypes from '../../node/node-types';
import ParserPlugin from '../../parser-plugin';
const stringPlugin = new ParserPlugin(
(parser) => {
return parser.match('string');
},
(parser) => {
return {
type: NodeTypes.StringLiteral,
value: parser.consume('string', 'Expected string').value
};
}
);
export default stringPlugin;