llparse
Version:
Compile incremental parsers to C code
12 lines (9 loc) • 351 B
text/typescript
import * as frontend from 'llparse-frontend';
import { Compilation } from '../compilation';
import { Field } from './field';
export class Test extends Field<frontend.code.Test> {
protected doBuild(ctx: Compilation, out: string[]): void {
const value = this.ref.value;
out.push(`return (${this.field(ctx)} & ${value}) == ${value};`);
}
}