public StructureBuilder(NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(BundleManagerBase.DefaultStructureClass, ns, loc, attr) { BaseClass = new UserType (typeof (StructureTemplate)); ns.SetUserParams (this); }
public BGProviderBuilder (string name, NamespaceBuilder ns) : base (ns) { if (Structure[name] != StructureParameterKind.Basis) throw ExHelp.App ("No such basis parameter {0} for provider", name); basisparam = name; }
public NamespaceBuilder GetNamespace (string name) { if (!namespaces.ContainsKey (name)) namespaces[name] = new NamespaceBuilder (name, new TypeResolveContext (this)); return namespaces[name]; }
public StructureBuilder (NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (BundleManagerBase.DefaultStructureClass, ns, loc, attr) { BaseClass = new UserType (typeof (StructureTemplate)); ns.SetUserParams (this); }
public TheResult (string name, NamespaceBuilder ns, string ename, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { etype = new UserType (ename); BaseClass = new UserType (typeof (EnumResult<>)); BaseClass.AddTypeArgument (etype); }
void NewNamespace (string name) { // We cannot reuse because different namespace {} clauses // of the same value may have different usings. cur_ns = new NamespaceBuilder (name, new TypeResolveContext (driver)); namespaces.Add (cur_ns); }
void NewNamespace(string name) { // We cannot reuse because different namespace {} clauses // of the same value may have different usings. cur_ns = new NamespaceBuilder(name, new TypeResolveContext(driver)); namespaces.Add(cur_ns); }
public MetaRuleBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) { rb = new RuleBuilder (name, ns, loc, attr); tmpl = new RuleTemplateBuilder (name + "RTemplate", rb, ns, loc, attr); ns.AddMetaRule (this); BaseClass = RuleType; }
public MetaRuleBuilder(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) { rb = new RuleBuilder(name, ns, loc, attr); tmpl = new RuleTemplateBuilder(name + "RTemplate", rb, ns, loc, attr); ns.AddMetaRule(this); BaseClass = RuleType; }
public TheResult(string name, NamespaceBuilder ns, string ename, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { etype = new UserType(ename); BaseClass = new UserType(typeof(EnumResult <>)); BaseClass.AddTypeArgument(etype); }
public EnumResultBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) { if (name == null) throw new ArgumentNullException (); enumer = new TheEnum (name, ns, loc, attr); result = new TheResult (name + "Result", ns, name, loc, attr); }
public NamespaceBuilder GetNamespace(string name) { if (!namespaces.ContainsKey(name)) { namespaces[name] = new NamespaceBuilder(name, new TypeResolveContext(this)); } return(namespaces[name]); }
public BGProviderBuilder(string name, NamespaceBuilder ns) : base(ns) { if (Structure[name] != StructureParameterKind.Basis) { throw ExHelp.App("No such basis parameter {0} for provider", name); } basisparam = name; }
public EnumResultBuilder(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) { if (name == null) { throw new ArgumentNullException(); } enumer = new TheEnum(name, ns, loc, attr); result = new TheResult(name + "Result", ns, name, loc, attr); }
protected TypeExpressedItem (string namebase, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attrs) { if (namebase == null) throw new ArgumentNullException (); this.namebase = namebase; location = loc; this.attrs = attrs; this.ns = ns; ns.AddItem (this); }
public StructureElement (NamespaceBuilder ns) { if (!(ns.Params is StructureBuilder)) throw new Exception ("Trying to instantiate a structure element in a " + "namespace that has already had its structure template " + "defined."); this.sb = (StructureBuilder) ns.Params; this.ns = ns; sb.AddElement (this); }
void CloseNamespace() { if (cur_ns.Params == null) { // If we haven't declared any parameters for this space // yet, and we don't reference a library that has, // create our own parameterless structurebuilder. new StructureBuilder(cur_ns, lexer.LinePragma, 0); } cur_ns = null; }
protected TypeExpressedItem(string namebase, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attrs) { if (namebase == null) { throw new ArgumentNullException(); } this.namebase = namebase; location = loc; this.attrs = attrs; this.ns = ns; ns.AddItem(this); }
public StructureElement(NamespaceBuilder ns) { if (!(ns.Params is StructureBuilder)) { throw new Exception("Trying to instantiate a structure element in a " + "namespace that has already had its structure template " + "defined."); } this.sb = (StructureBuilder)ns.Params; this.ns = ns; sb.AddElement(this); }
void AddNamespaceParam(string ns) { // FIXME: we can't distinguish references to A.Foo and B.Foo! // Need a syntax for this. UserType t = new UserType(NamespaceBuilder.MakeStructureName(ns)); string paramname = ns; int i = ns.LastIndexOf('.'); if (i >= 0) { paramname = ns.Substring(i + 1); } cur_nsstruct.AddStructureParam(t, paramname, ns); }
public TheEnum(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { BaseClass = new UserType(typeof(int)); }
public StructureBoundItem (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { this.ns = ns; }
public RuleBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { BaseClass = RuleClass; fp.Add (name); }
public MatcherBuilder(NamespaceBuilder ns, CodeLinePragma loc) : base("RegexMatcher", ns, loc, TypeAttributes.Public) { BaseClass = new UserType(typeof(RegexMatcher)); serial = matcher_serial++; }
public RuleBuilder(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { BaseClass = RuleClass; fp.Add(name); }
public MatcherBuilder (NamespaceBuilder ns, CodeLinePragma loc) : base ("RegexMatcher", ns, loc, TypeAttributes.Public) { BaseClass = new UserType (typeof (RegexMatcher)); serial = matcher_serial++; }
public SourcefileRuleBuilder(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { BaseClass = new UserType(typeof(SourcefileRule)); fp.Add(name); }
public RuleTemplateBuilder (string name, RuleBuilder rb, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { this.rb = rb; }
// A TemplateBuilder may never actually reference a structure. // In that case, UseStructure () isn't called and UsesStructure // is therefore false. public TemplateBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { BaseClass = TTType; }
void CloseNamespace () { if (cur_ns.Params == null) // If we haven't declared any parameters for this space // yet, and we don't reference a library that has, // create our own parameterless structurebuilder. new StructureBuilder (cur_ns, lexer.LinePragma, 0); cur_ns = null; }
public SourcefileRuleBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { BaseClass = new UserType (typeof (SourcefileRule)); fp.Add (name); }
// FIXME: Resurrect the 'implementation code' idea? // It was kind of useful I think. public ResultBuilder (string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base (name, ns, loc, attr) { BaseClass = new UserType (typeof (Result)); }
public StructureBoundItem(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { this.ns = ns; }
// A TemplateBuilder may never actually reference a structure. // In that case, UseStructure () isn't called and UsesStructure // is therefore false. public TemplateBuilder(string name, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { BaseClass = TTType; }
public RuleTemplateBuilder(string name, RuleBuilder rb, NamespaceBuilder ns, CodeLinePragma loc, TypeAttributes attr) : base(name, ns, loc, attr) { this.rb = rb; }