MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / createSourceNode

Method createSourceNode

src/LuaPrinter.ts:277–283  ·  view source on GitHub ↗
(node: lua.Node, chunks: SourceChunk | SourceChunk[], name?: string)

Source from the content-addressed store, hash-verified

275 }
276
277 protected createSourceNode(node: lua.Node, chunks: SourceChunk | SourceChunk[], name?: string): SourceNode {
278 const { line, column } = lua.getOriginalPos(node);
279
280 return line !== undefined && column !== undefined
281 ? new SourceNode(line + 1, column, this.relativeSourcePath, chunks, name)
282 : new SourceNode(null, null, this.relativeSourcePath, chunks, name);
283 }
284
285 protected concatNodes(...chunks: SourceChunk[]): SourceNode {
286 return new SourceNode(null, null, this.relativeSourcePath, chunks);

Callers 15

printForInStatementMethod · 0.95
printGotoStatementMethod · 0.95
printLabelStatementMethod · 0.95
printReturnStatementMethod · 0.95
printBreakStatementMethod · 0.95
printStringLiteralMethod · 0.95
printNumericLiteralMethod · 0.95
printNilLiteralMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected