public NamedValueOccurrence newOccurrenceIn(NameBindingScope referencingScope) { var occurrence = new NamedValueOccurrence(this); occurrences.Add(occurrence); if (occurrence.IsFreeVariable && IsStackResident) { nonLocalOccurenceCount++; } return(occurrence); }
public virtual void handleIllegalAssignment(NamedValueOccurrence unassignableIdentifier, SourceSpan span) { errorCount++; if (illegalAssignmentAction != null) { illegalAssignmentAction(unassignableIdentifier, span); return; } StringBuilder sb = new StringBuilder(); sb.Append("Attempt to assign a value to a constant: "); sb.Append(unassignableIdentifier.NameString); HandleError(sb.ToString(), span, 0, Severity.Error); }
public VariableReferenceNode newVariableReferenceNode(NamedValueOccurrence variableReference) { return(new VariableReferenceNode(this, variableReference)); }