Permalink
Browse files

Worked in rest of unicode for identifiers as per language spec. Ready…

… for 0.0.3
  • Loading branch information...
1 parent 7837704 commit d06b7a3326841dceb91a8c839d81e335724ed03a @alanz alanz committed Dec 28, 2010
View
@@ -28,3 +28,10 @@
/unicode/uc-lu.htm
/unicode/uc-nl.htm
/unicode/list.hs~
+/unicode/combiningmark.sh~
+/unicode/connector-punctuation.sh~
+/unicode/digit.sh~
+/unicode/uc-mc.htm
+/unicode/uc-mn.htm
+/unicode/uc-nd.htm
+/unicode/uc-pc.htm
@@ -1,5 +1,5 @@
Name: language-javascript
-Version: 0.0.2
+Version: 0.0.3
Synopsis: Parser for JavaScript
Description: Parses Javascript into an Abstract Syntax Tree (AST). Initially intended as frontend to hjsmin.
Homepage: https://github.com/alanz/language-javascript
View
@@ -235,8 +235,13 @@ testSuite = testGroup "Parser"
, testCase "unicode4-lt" (testProg "//comment\x2028x=1;" "Right (JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"x\",JSOperator \"=\",JSDecimal \"1\"]],JSLiteral \";\"])")
, testCase "unicode5-lt" (testProg "//comment\x2029x=1;" "Right (JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"x\",JSOperator \"=\",JSDecimal \"1\"]],JSLiteral \";\"])")
- , testCase "unicode2" (testProg "àáâãäå = 1;" "")
- , testCase "unicode3" (testFile "./test/Unicode.js" "")
+ , testCase "unicode2" (testProg "àáâãäå = 1;" "Right (JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"\\224\\225\\226\\227\\228\\229\",JSOperator \"=\",JSDecimal \"1\"]],JSLiteral \";\"])")
+
+ , testCase "unicode3" (testProg "$aà = 1;_b=2;\0065a=2" "Right (JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"$a\\224\",JSOperator \"=\",JSDecimal \"1\"]],JSLiteral \";\",JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"_b\",JSOperator \"=\",JSDecimal \"2\"]],JSLiteral \";\",JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"Aa\",JSOperator \"=\",JSDecimal \"2\"]]])")
+
+ , testCase "unicode4" (testProg "x=\"àáâãäå\";y='\3012a\0068'" "Right (JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"x\",JSOperator \"=\",JSStringLiteral '\"' \"\\224\\225\\226\\227\\228\\229\"]],JSLiteral \";\",JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"y\",JSOperator \"=\",JSStringLiteral '\\'' \"\\3012aD\"]]])")
+
+ , testCase "unicode5" (testFile "./test/Unicode.js" "JSSourceElementsTop [JSExpression [JSElement \"assignmentExpression\" [JSIdentifier \"\\224\\225\\226\\227\\228\\229\",JSOperator \"=\",JSDecimal \"1\"]],JSLiteral \";\"]")
]

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# UnicodeCombiningMark
+# any character in the Unicode categories “Non-spacing mark (Mn)” or “Combining spacing mark (Mc)”
+
+wget -c 'http://www.fileformat.info/info/unicode/category/Mn/list.htm?mode=print' -O uc-mn.htm
+wget -c 'http://www.fileformat.info/info/unicode/category/Mc/list.htm?mode=print' -O uc-mc.htm
+
+grep --no-filename -o -E "U\+[0-9a-fA-F]+" uc-m*.htm | sort > list-cm.txt
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+
+# UnicodeConnectorPunctuation
+# any character in the Unicode category “Connector punctuation (Pc)”
+
+wget -c 'http://www.fileformat.info/info/unicode/category/Pc/list.htm?mode=print' -O uc-pc.htm
+
+grep --no-filename -o -E "U\+[0-9a-fA-F]+" uc-pc.htm | sort > list-pc.txt
View
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# UnicodeDigit
+# any character in the Unicode category “Decimal number (Nd)”
+
+wget -c 'http://www.fileformat.info/info/unicode/category/Nd/list.htm?mode=print' -O uc-nd.htm
+
+grep --no-filename -o -E "U\+[0-9a-fA-F]+" uc-nd.htm | sort > list-nd.txt
Oops, something went wrong.

0 comments on commit d06b7a3

Please sign in to comment.