Merge pull request #2 from RX14/master
Add crystal parser
commit6961f10f26f2e719537e25ee173b01b0b2e861ff
authorNicolas Seriot <nicolas@seriot.ch>
dateWed 26 Oct 2016, 22:02 (10 years ago)
parente5450d8929c846
parsers/test_json.crnew file+19
@@ -0,0 +1,19 @@
1+require "json"
2+
3+file = ARGV[0]
4+
5+begin
6+ puts(file)
7+ json = File.read(file)
8+ result = JSON.parse_raw(json)
9+ p result
10+
11+ if result.nil?
12+ exit 1
13+ else
14+ exit 0
15+ end
16+rescue ex : JSON::Error
17+ puts(ex)
18+ exit 1
19+end
run_tests.py+5
@@ -77,6 +77,11 @@ programs = {
7777 "url":"",
7878 "commands":["/usr/bin/ruby", os.path.join(PARSERS_DIR, "test_json_re.rb")]
7979 },
80+ "Crystal":
81+ {
82+ "url":"https://github.com/crystal-lang/crystal",
83+ "commands":[os.path.join(PARSERS_DIR, "test_json_cr")]
84+ },
8085 "JavaScript":
8186 {
8287 "url":"",