コード例 #1
0
ファイル: Element.cs プロジェクト: mortend/uno
 public Element(Source src, string value, Disambiguation disamg = 0, params Namescope[] usings)
 {
     Source         = src;
     String         = value;
     Disambiguation = disamg;
     Usings         = usings;
 }
コード例 #2
0
ファイル: Matcher.cs プロジェクト: sucaba/IronTextLibrary
 public Matcher(
     string pattern,
     SymbolBase outcome            = null,
     ForeignContextRef context     = null,
     Condition nextCondition       = null,
     Disambiguation disambiguation = Disambiguation.Undefined)
     : this(
         ScanPattern.CreateRegular(pattern),
         outcome,
         context,
         nextCondition,
         disambiguation)
 {
 }
コード例 #3
0
        // TODO: Logic should not be present in attribute constructor
        public LiteralAttribute(string text, Disambiguation disambiguation = Disambiguation.Exclusive)
        {
            base.LiteralText = text;
            base.Disambiguation = disambiguation;

            // Look-ahead is needed because .net Regex does not select longest match but the first alternative.
            this.RegexPattern = Regex.Escape(text);
            if (text != "(" && text != ")")
            {
                this.RegexPattern += @"(?=[ \t\(\)"";]|$)";
            }

            this.Pattern = ScannerUtils.Escape(text);
        }
コード例 #4
0
        // TODO: Logic should not be present in attribute constructor
        public LiteralAttribute(string text, Disambiguation disambiguation = Disambiguation.Exclusive)
        {
            base.LiteralText    = text;
            base.Disambiguation = disambiguation;

            // Look-ahead is needed because .net Regex does not select longest match but the first alternative.
            this.RegexPattern = Regex.Escape(text);
            if (text != "(" && text != ")")
            {
                this.RegexPattern += @"(?=[ \t\(\)"";]|$)";
            }

            this.Pattern = ScannerUtils.Escape(text);
        }
コード例 #5
0
ファイル: Matcher.cs プロジェクト: sucaba/IronTextLibrary
        public Matcher(
            ScanPattern pattern,
            SymbolBase outcome            = null,
            ForeignContextRef context     = null,
            Condition nextCondition       = null,
            Disambiguation disambiguation = Disambiguation.Undefined)
        {
            this.Pattern       = pattern;
            this.Outcome       = outcome;
            this.Context       = context;
            this.NextCondition = nextCondition;

            if (disambiguation == Disambiguation.Undefined)
            {
                this.Disambiguation = pattern.DefaultDisambiguation;
            }
            else
            {
                this.Disambiguation = disambiguation;
            }

            this.Joint = new Joint();
        }
コード例 #6
0
ファイル: TypeExtension.cs プロジェクト: mortend/uno
 public TypeExtension(Source src, DataType dt, Disambiguation disamg = 0)
     : base(src, dt, disamg)
 {
 }
コード例 #7
0
ファイル: FunctionExtension.cs プロジェクト: mortend/uno
 public FunctionExtension(Source src, Function func, Disambiguation disamg = 0, params Namescope[] scopes)
     : base(src, func, disamg)
 {
     Scopes = scopes;
 }
コード例 #8
0
 public ExtensionEntity(Source src, object obj, Disambiguation disamg)
 {
     Source         = src;
     Object         = obj;
     Disambiguation = disamg;
 }
コード例 #9
0
 // Allow providing regular expression pattern for bootstrapping
 internal MatchAttribute(string scanPattern, string rePattern, Disambiguation disambiguation = Disambiguation.Contextual)
 {
     Pattern        = scanPattern;
     RegexPattern   = rePattern;
     Disambiguation = disambiguation;
 }
コード例 #10
0
 public MatchAttribute(string sre, Disambiguation disambiguation = Disambiguation.Contextual)
 {
     Pattern        = sre;
     Disambiguation = disambiguation;
 }
コード例 #11
0
 public void Set(string key, SourceValue value, Disambiguation disamg = 0)
 {
     Extensions.Properties[key] = new Element(value.Source, value.String, disamg);
 }
コード例 #12
0
 // Allow providing regular expression pattern for bootstrapping
 internal MatchAttribute(string scanPattern, string rePattern, Disambiguation disambiguation = Disambiguation.Contextual)
 {
     Pattern = scanPattern;
     RegexPattern = rePattern;
     Disambiguation = disambiguation;
 }
コード例 #13
0
 public MatchAttribute(string sre, Disambiguation disambiguation = Disambiguation.Contextual)
 {
     Pattern = sre;
     Disambiguation = disambiguation;
 }