Esempio n. 1
0
        public static Node CreateNumberToken(float value)
        {
            var pattern = new TokenPattern((int)HlslConstants.NUMBER,
                                           "NUMBER", TokenPattern.PatternType.STRING, value.ToString("0.0######", CultureInfo.InvariantCulture));

            return(new Token(pattern, pattern.GetPattern(), 1, 1));
        }
Esempio n. 2
0
        public static Node CreateVoidToken()
        {
            TokenPattern patternVoid = new TokenPattern((int)HlslConstants.VOID,
                                                        "VOID", TokenPattern.PatternType.STRING, "void");

            return(new Token(patternVoid, patternVoid.GetPattern(), 1, 1));
        }
Esempio n. 3
0
        public static Node CreateEqualToken()
        {
            TokenPattern patternEqual = new TokenPattern((int)HlslConstants.EQUAL,
                                                         "EQUAL", TokenPattern.PatternType.STRING, "=");

            return(new Token(patternEqual, patternEqual.GetPattern(), 1, 1));
        }
Esempio n. 4
0
        public static Node CreateNewLineToken()
        {
            TokenPattern patternNEW_LINE = new TokenPattern((int)HlslConstants.NEWLINE,
                                                            "NEWLINE", TokenPattern.PatternType.STRING, "\n");

            return(new Token(patternNEW_LINE, patternNEW_LINE.GetPattern(), 1, 1));
        }
Esempio n. 5
0
        public static Node CreateVaryingToken()
        {
            TokenPattern patternVarying = new TokenPattern((int)HlslConstants.VARYING,
                                                           "VARYING", TokenPattern.PatternType.STRING, "varying");

            return(new Token(patternVarying, patternVarying.GetPattern(), 1, 1));
        }
Esempio n. 6
0
        public static Node CreateDotCommaToken()
        {
            TokenPattern patternDOT_COMMA = new TokenPattern((int)HlslConstants.DOT_COMMA,
                                                             "DOT_COMMA", TokenPattern.PatternType.STRING, ";");

            return(new Token(patternDOT_COMMA, patternDOT_COMMA.GetPattern(), 1, 1));
        }
Esempio n. 7
0
        public static Node CreateSpaceToken()
        {
            TokenPattern patternWHITESPACE = new TokenPattern((int)HlslConstants.WHITESPACE,
                                                              "WHITESPACE", TokenPattern.PatternType.STRING, " ");

            return(new Token(patternWHITESPACE, patternWHITESPACE.GetPattern(), 1, 1));
        }
 public static Node CreateVaryingToken()
 {
     TokenPattern patternVarying = new TokenPattern((int) HlslConstants.VARYING,
                                "VARYING", TokenPattern.PatternType.STRING, "varying");
     return new Token(patternVarying, patternVarying.GetPattern(), 1, 1);
 }
 public static Node CreateVoidToken()
 {
     TokenPattern patternVoid = new TokenPattern((int)HlslConstants.VOID,
                                "VOID", TokenPattern.PatternType.STRING, "void");
     return new Token(patternVoid, patternVoid.GetPattern(), 1, 1);
 }
Esempio n. 10
0
 public static Node CreateSpaceToken()
 {
     TokenPattern patternWHITESPACE = new TokenPattern((int) HlslConstants.WHITESPACE,
                               "WHITESPACE", TokenPattern.PatternType.STRING, " ");
     return new Token(patternWHITESPACE, patternWHITESPACE.GetPattern(), 1, 1);
 }
Esempio n. 11
0
 public static Node CreateNumberToken(float value)
 {
     var pattern = new TokenPattern((int)HlslConstants.NUMBER,
                                 "NUMBER", TokenPattern.PatternType.STRING, value.ToString("0.0######",CultureInfo.InvariantCulture));
     return new Token(pattern, pattern.GetPattern(), 1, 1);
 }
Esempio n. 12
0
 public static Node CreateNewLineToken()
 {
     TokenPattern patternNEW_LINE = new TokenPattern((int) HlslConstants.NEWLINE,
                                "NEWLINE", TokenPattern.PatternType.STRING, "\n");
     return new Token(patternNEW_LINE, patternNEW_LINE.GetPattern(), 1, 1);
 }
Esempio n. 13
0
 public static Node CreateEqualToken()
 {
     TokenPattern patternEqual = new TokenPattern((int)HlslConstants.EQUAL,
                                 "EQUAL", TokenPattern.PatternType.STRING, "=");
     return new Token(patternEqual, patternEqual.GetPattern(), 1, 1);
 }
Esempio n. 14
0
 public static Node CreateDotCommaToken()
 {
     TokenPattern patternDOT_COMMA = new TokenPattern((int) HlslConstants.DOT_COMMA,
                               "DOT_COMMA", TokenPattern.PatternType.STRING, ";");
     return new Token(patternDOT_COMMA, patternDOT_COMMA.GetPattern(), 1, 1);
 }