MCPcopy Index your code
hub / github.com/angular/angular / createMinus

Method createMinus

packages/compiler/src/expression_parser/ast.ts:355–365  ·  view source on GitHub ↗

* Creates a unary minus expression "-x", represented as `Binary` using "0 - x".

(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST)

Source from the content-addressed store, hash-verified

353 * Creates a unary minus expression "-x", represented as `Binary` using "0 - x".
354 */
355 static createMinus(span: ParseSpan, sourceSpan: AbsoluteSourceSpan, expr: AST): Unary {
356 return new Unary(
357 span,
358 sourceSpan,
359 '-',
360 expr,
361 '-',
362 new LiteralPrimitive(span, sourceSpan, 0),
363 expr,
364 );
365 }
366
367 /**
368 * Creates a unary plus expression "+x", represented as `Binary` using "x - 0".

Callers 1

parsePrefixMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected