{@Line}

Product: 

Class: 

Warning

uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.

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

This page last modified on: 

8/21/2026