Esempio n. 1
0
        public NamedValueOccurrence newOccurrenceIn(NameBindingScope referencingScope)
        {
            var occurrence = new NamedValueOccurrence(this);

            occurrences.Add(occurrence);
            if (occurrence.IsFreeVariable && IsStackResident)
            {
                nonLocalOccurenceCount++;
            }
            return(occurrence);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public VariableReferenceNode newVariableReferenceNode(NamedValueOccurrence variableReference)
 {
     return(new VariableReferenceNode(this, variableReference));
 }