declarationIdentifier method

IdentifierExpr declarationIdentifier(
  1. String id,
  2. HTResolvedVariable variable,
  3. ASTNode origin
)

Implementation

IdentifierExpr declarationIdentifier(
  String id,
  HTResolvedVariable variable,
  ASTNode origin,
) {
  final expression = IdentifierExpr(
    id,
    role: HTIdentifierRole.synthetic,
    source: origin.source,
    line: origin.line,
    column: origin.column,
    offset: origin.offset,
    length: origin.length,
  );
  syntheticDeclarations[expression] = variable;
  return recordSynthetic(expression, origin);
}