remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / extra / peg / javascript / tokenizer / tokenizer-tests.factor
blobf0080a31b2109f1e1dc41f8fa48210a364a5fb76
1 ! Copyright (C) 2008 Chris Double.
2 ! See http://factorcode.org/license.txt for BSD license.
4 USING: kernel tools.test peg peg.javascript.ast peg.javascript.tokenizer accessors ;
5 IN: peg.javascript.tokenizer.tests
7 \ tokenize-javascript must-infer
10   V{
11     T{ ast-number f 123 }
12     ";"
13     T{ ast-string f "hello" }
14     ";"
15     T{ ast-name f "foo" }
16     "("
17     T{ ast-name f "x" }
18     ")"
19     ";"
20   }    
21 } [
22   "123; 'hello'; foo(x);" tokenize-javascript
23 ] unit-test
25 { V{ T{ ast-regexp f "<(w+)[^>]*?)/>" "g" } } } [
26   "/<(\\w+)[^>]*?)\\/>/g" tokenize-javascript
27 ] unit-test