From 0b6210cd37b68b94252cb798598b12974a20e1c1 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 21 May 2024 22:56:19 +0200 Subject: Adding upstream version 5.28.2+dfsg1+~cs23.11.12.3. Signed-off-by: Daniel Baumann --- .../test/fixtures/implementation/node/single.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 llparse-frontend/test/fixtures/implementation/node/single.ts (limited to 'llparse-frontend/test/fixtures/implementation/node/single.ts') diff --git a/llparse-frontend/test/fixtures/implementation/node/single.ts b/llparse-frontend/test/fixtures/implementation/node/single.ts new file mode 100644 index 0000000..b24ef93 --- /dev/null +++ b/llparse-frontend/test/fixtures/implementation/node/single.ts @@ -0,0 +1,22 @@ +import { node } from '../../../../src/frontend'; +import { Node } from './base'; + +export class Single extends Node { + protected doBuild(out: string[]): void { + const edges: string[] = []; + for (const edge of this.ref.edges) { + let str = `k${edge.key}${edge.noAdvance ? '-no_adv-' : ''}=` + + `${edge.node.ref.id.name}`; + if (edge.value !== undefined) { + str += `:${edge.value}`; + } + edges.push(str); + } + out.push(this.format(edges.join(' '))); + + for (const edge of this.ref.edges) { + const edgeNode = edge.node as Node; + edgeNode.build(out); + } + } +} -- cgit v1.2.3