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

Method printUnaryExpression

src/LuaPrinter.ts:731–743  ·  view source on GitHub ↗
(expression: lua.UnaryExpression)

Source from the content-addressed store, hash-verified

729 }
730
731 public printUnaryExpression(expression: lua.UnaryExpression): SourceNode {
732 const chunks: SourceChunk[] = [];
733
734 chunks.push(this.printOperator(expression.operator));
735 chunks.push(
736 this.printExpressionInParenthesesIfNeeded(
737 expression.operand,
738 LuaPrinter.operatorPrecedence[expression.operator]
739 )
740 );
741
742 return this.createSourceNode(expression, chunks);
743 }
744
745 public printBinaryExpression(expression: lua.BinaryExpression): SourceNode {
746 const chunks: SourceChunk[] = [];

Callers 1

printExpressionMethod · 0.95

Calls 3

printOperatorMethod · 0.95
createSourceNodeMethod · 0.95

Tested by

no test coverage detected