示例#1
0
        public static StringLiteral CreatePythonString(string name)
        {
            StringLiteral term = new StringLiteral(name, TermOptions.SpecialIgnoreCase);

            term.AddStartEnd("'", ScanFlags.AllowAllEscapes);
            term.AddStartEnd("'''", ScanFlags.AllowAllEscapes | ScanFlags.AllowLineBreak);
            term.AddStartEnd("\"", ScanFlags.AllowAllEscapes);
            term.AddStartEnd("\"\"\"", ScanFlags.AllowAllEscapes | ScanFlags.AllowLineBreak);

            term.AddPrefixFlag("u", ScanFlags.AllowAllEscapes);
            term.AddPrefixFlag("r", ScanFlags.DisableEscapes);
            term.AddPrefixFlag("ur", ScanFlags.DisableEscapes);

            return(term);
        }
示例#2
0
        public static StringLiteral CreateCSharpString(string name)
        {
            StringLiteral term = new StringLiteral(name, TermOptions.None);

            term.AddStartEnd("\"", ScanFlags.AllowAllEscapes);
            term.AddPrefixFlag("@", ScanFlags.DisableEscapes | ScanFlags.AllowLineBreak | ScanFlags.AllowDoubledQuote);
            return(term);
        }
示例#3
0
 private static StringLiteral CreateScriptNetString(string name)
 {
     StringLiteral term = new StringLiteral(name, TermOptions.None);
       term.AddStartEnd("'", ScanFlags.AllowAllEscapes);
       term.AddStartEnd("\"", ScanFlags.AllowAllEscapes);
       term.AddPrefixFlag("@", ScanFlags.DisableEscapes | ScanFlags.AllowLineBreak | ScanFlags.AllowDoubledQuote);
       return term;
 }
        public static StringLiteral CreatePythonString(string name)
        {
            StringLiteral term = new StringLiteral(name, TermOptions.SpecialIgnoreCase);
              term.AddStartEnd("'", ScanFlags.AllowAllEscapes);
              term.AddStartEnd("'''", ScanFlags.AllowAllEscapes | ScanFlags.AllowLineBreak);
              term.AddStartEnd("\"", ScanFlags.AllowAllEscapes);
              term.AddStartEnd("\"\"\"", ScanFlags.AllowAllEscapes | ScanFlags.AllowLineBreak);

              term.AddPrefixFlag("u", ScanFlags.AllowAllEscapes);
              term.AddPrefixFlag("r", ScanFlags.DisableEscapes );
              term.AddPrefixFlag("ur", ScanFlags.DisableEscapes);

              return term;
        }