public void AddVariable(bool local, string identifier, SymType type) { if (local) { _table.Add(identifier.ToLower(), new SymLocal(type)); } else { _table.Add(identifier.ToLower(), new SymGlobal(type)); } }
public bool IsEquivalent(SymType other) { switch (other) { case SymAliasType symAliasType: return(IsEquivalent(symAliasType)); case SymArrayType symArrayType: return(IsEquivalent(symArrayType)); case SymBoolType symBoolType: return(IsEquivalent(symBoolType)); case SymCharType symCharType: return(IsEquivalent(symCharType)); case SymConformatArrayType symConformatArrayType: return(IsEquivalent(symConformatArrayType)); case SymFloatType symFloatType: return(IsEquivalent(symFloatType)); case SymIntegerType symInteger: return(IsEquivalent(symInteger)); case SymNilConst symNilConst: return(IsEquivalent(symNilConst)); case SymPointerType symPointerType: return(IsEquivalent(symPointerType)); case SymRecordType symRecordType: return(IsEquivalent(symRecordType)); case SymStringType symStringType: return(IsEquivalent(symStringType)); } return(false); }
public void AddType(string identifier, SymType sym) { _table.Add(identifier.ToLower(), sym); }
public void AddType(SymType sym) { _table.Add(sym.Ident.ToLower(), sym); }
public SymPointerType(SymType referencedSymType) : base("^" + referencedSymType.Ident, false) { ReferencedSymType = referencedSymType; }
public SymConformatArrayType(SymType elemSymType) : base("", false) { ElementSymType = elemSymType; }
public SymArrayType(IndexRangeSymbol <int, int> indexRange, SymType elemSymType, string ident = "") : base(ident, false) { IndexRange = indexRange; ElementSymType = elemSymType; }
public SymAliasType(string ident, SymType symType) : base(ident, symType.isTrivial) { Alias = symType; }