Add crystal parser
Compile with `crystal build parsers/test_json.cr -o parsers/test_json_cr`.
commit929c8467fac62d148b4bfb858521631d1a7d17df
authorRX14 <chris@rx14.co.uk>
dateWed 26 Oct 2016, 18:20 (10 years ago)
parentc258e9a
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":"",