uCalc API Version: 2.1.3-preview.2 Released: 6/17/2026

Warning

uCalc API Preview Release Notice:The documentation describes the intended behavior of the API. The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.

{@Line}

Product: 

Class: 

Remarks

Description: A structural matcher that captures all tokens from the current position until the end of the line.

The {@Line} directive is used within a uCalc::Transformer to consume an entire line of input. Because uCalc is token-aware, {@Line} doesn't just look for a newline character; it captures the sequence of tokens that constitute the rest of the current logical line.

Key Characteristics

  • Greedy until EOL: It will match every token until it encounters a newline token or the end of the input stream.
  • Newline Excluded: Typically, {@Line} captures the content before the newline, leaving the newline token itself available for the next match or structural processing.
  • Token Sensitivity: It respects token boundaries, ensuring that it doesn't break in the middle of a multi-character token if one happens to span a line (though rare).

Inverse Matching with !

The universal inversion operator ! can be applied to this directive:

  • {@Line}: Matches the rest of the line.
  • {!Line}: Matches a token only if it is a newline (or a token that breaks the "line" continuity).

Examples