Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo n.º 8
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);
 }
Exemplo n.º 9
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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }
Exemplo 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);
 }