コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
ファイル: EnumerationBuilder.cs プロジェクト: bgrevelt/biPage
        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;
        }
コード例 #5
0
ファイル: Visitor.cs プロジェクト: bgrevelt/biPage
 public void Visit(AST.FieldType t)
 {
 }