visitLine method
The default implementation returns the result of calling
visitChildren on ctx
.
Implementation
@override
void visitLine(LineContext ctx) {
final key = ctx.key();
if (key != null && key.text.isNotEmpty) {
final name = key.text;
final value = ctx.value().value;
final type = ctx.value().type;
final comments = ctx
.comments()
.map((e) => [e.text.substring(1).trim(), ''])
.expand((e) => e)
.where((e) => e.isNotEmpty);
keyMap[name] = KeyValue(
name: name,
type: type,
value: value,
comments: [
'From $target',
">> $name = ${ctx.value()?.text ?? ''}",
...comments,
],
);
}
super.visitLine(ctx);
}