UNPKG

@flowscripter/mpeg-sdl-parser

Version:

ISO/IEC 14496-34 Syntactic Description Language (MPEG SDL) parser implemented in TypeScript

25 lines (22 loc) 711 B
import type { Token } from "../token/Token.ts"; import type { AbstractNode } from "./AbstractNode.ts"; import { AbstractStatement } from "./AbstractStatement.ts"; import { StatementKind } from "./enum/statement_kind.ts"; export class CompoundStatement extends AbstractStatement { constructor( public readonly statements: AbstractStatement[], public readonly openBracePunctuator: Token, public readonly closeBracePunctuator: Token, ) { super( StatementKind.COMPOUND, openBracePunctuator, closeBracePunctuator, ); } override *getChildNodeIterable(): IterableIterator<AbstractNode> { for (const statement of this.statements) { yield statement; } } }