public Field(SourceInfo sourceIfo, String name, AST.FieldType type, IExpression collection_size, Constants.IFixer fixer) : base(sourceIfo) { this.Name = name; this.Type = type; this.CollectionSize = collection_size; this.Fixer = fixer; }
public Integral TranslateIntegral(AST.FieldType original) { translated_type = null; original.Accept(this); Debug.Assert(translated_type != null); Debug.Assert(translated_type is Integral); return(translated_type as Integral); }
public FieldType Translate(AST.FieldType original, String fieldName, AST.Expressions.IExpression collectionSize) { this.FieldName = fieldName; translated_type = null; original.Accept(this); Debug.Assert(translated_type != null); return(translated_type); }
private void Build(String name, AST.FieldType type, IList <AST.Enumerator> enumerators) { var enum_type = this.fieldTypeTranslator.TranslateIntegral(type); // We don't support other types of enumerations. F.i. enum : ascii_string { option_one : "bla", option_two : "blah"}; var translated = new Enumeration(name, enum_type as FieldTypes.Integral); foreach (var enumerator in enumerators) { translated.AddEnumerator(new Enumerator(enumerator.Name, enumerator.Value)); } Debug.Assert(!Elements.ContainsKey(name), "Element names should be unique"); Elements[translated.Name] = translated; }
public void Visit(AST.FieldType t) { }