TagContext class abstract

The tag execution context.

Constructors

TagContext(TagContext? parent, Tag? tag, Compiler compiler, IOSink output)

Properties

args Map<String, String>?
The map of arguments. If a tag assigns a non-null value, it means
getter/setter pair
compiler Compiler
final
data ↔ dynamic
Tag-specific data. A tag can store anything here.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
line int
The line number of the starting of this context
no setter
output IOSink
The output stream to generate the Dart code.
getter/setter pair
parent TagContext?
The parent tag context, or null if this is root.
final
pre String
The whitespace that shall be generated in front of each line
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag Tag?
The tag
final

Methods

error(String message, [int line]) → Never
Throws an exception (and stops execution).
getLineNumberComment([int? line]) String
Returns the comment containing the line number.
indent() String
Indent for a new block of code. It adds two spaces to pre.
nextVar() String
Returns the next available name for a new local variable
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop() → dynamic
Pops the value back
push(dynamic value) → void
Push a value into the stack.
toString() String
A string representation of this object.
inherited
unindent() String
Un-indent to end a block of code. It removes two spaces from pre.
warning(String message, [int line]) → void
Display an warning.
write(String str) → void
Writes a string to output in the compiler's encoding.
writeCharCode(int code) → void
Writes a character code.
writeln([String? str]) → void
Write a string plus a linefeed to output in the compiler's encoding.

Operators

operator ==(Object other) bool
The equality operator.
inherited