Beispiel #1
0
 public bool checkUniqueLocalVar(DiagnosticPosition pos, VarSymbol varSymbol, WritableScope scope)
 {
     if (scope.getSymbolsByName(varSymbol.name, s => (s.kind & Kind.VAR) != 0).Any())
     {
         log.error(pos, messages.duplicateVar, varSymbol.name);
         return(false);
     }
     return(true);
 }
Beispiel #2
0
        public bool checkUnique(DiagnosticPosition pos, StructSymbol ssym, WritableScope scope)
        {
            bool contains = scope.getSymbolsByName(ssym.name, LookupKind.NON_RECURSIVE).Any();

            if (contains)
            {
                log.error(pos, messages.duplicateStructName, ssym.name);
            }
            return(!contains);
        }
Beispiel #3
0
Datei: Scope.cs Projekt: irpbc/mj
 public ScopeImpl(Symbol owner, WritableScope outer = null) : base(owner)
 {
     this.outer = outer;
 }
Beispiel #4
0
Datei: Scope.cs Projekt: irpbc/mj
 public CompoundScope(WritableScope primary, Scope secondary) : base(primary.owner)
 {
     this.primary   = primary;
     this.secondary = secondary;
 }