Merge lp:~zorba-coders/zorba/null-type-fix into lp:~zorba-coders/zorba/new-jsoniq

Proposed by Ghislain Fourny
Status: Merged
Merged at revision: 11352
Proposed branch: lp:~zorba-coders/zorba/null-type-fix
Merge into: lp:~zorba-coders/zorba/new-jsoniq
Diff against target: 53 lines (+12/-0)
6 files modified
src/compiler/parser/parser.y (+6/-0)
src/context/root_static_context.cpp (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res (+1/-0)
test/rbkt/Queries/zorba/jsoniq/js_null_type.xq (+1/-0)
test/rbkt/Queries/zorba/jsoniq/null_type.xq (+2/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/null-type-fix
Reviewer Review Type Date Requested Status
Ghislain Fourny Approve
Nicolae Brinza Approve
Review via email: mp+163902@code.launchpad.net

Commit message

Fixing null type parsing.

Description of the change

Fixing null type parsing.

To post a comment you must log in.
Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Ghislain Fourny (gislenius) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/parser/parser.y'
2--- src/compiler/parser/parser.y 2013-05-13 15:02:42 +0000
3+++ src/compiler/parser/parser.y 2013-05-15 12:38:15 +0000
4@@ -5451,6 +5451,12 @@
5 {
6 $$ = new GeneralizedAtomicType( LOC(@$), static_cast<QName*>($1) );
7 }
8+#ifdef JSONIQ_PARSER
9+| NULL_TOKEN
10+ {
11+ $$ = new GeneralizedAtomicType( LOC(@$), new QName(LOC(@$), "null") );
12+ }
13+#endif
14 ;
15
16
17
18=== modified file 'src/context/root_static_context.cpp'
19--- src/context/root_static_context.cpp 2013-04-08 19:44:58 +0000
20+++ src/context/root_static_context.cpp 2013-05-15 12:38:15 +0000
21@@ -140,6 +140,7 @@
22 "fn", static_context::W3C_FN_NS,
23 #ifdef ZORBA_WITH_JSON
24 "jn", static_context::JSONIQ_FN_NS,
25+ "js", static_context::JSONIQ_DM_NS,
26 #endif
27 "local", XQUERY_LOCAL_FN_NS,
28 "xml", XML_NS,
29
30=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res'
31--- test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res 1970-01-01 00:00:00 +0000
32+++ test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res 2013-05-15 12:38:15 +0000
33@@ -0,0 +1,1 @@
34+true
35
36=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res'
37--- test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res 1970-01-01 00:00:00 +0000
38+++ test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res 2013-05-15 12:38:15 +0000
39@@ -0,0 +1,1 @@
40+true
41
42=== added file 'test/rbkt/Queries/zorba/jsoniq/js_null_type.xq'
43--- test/rbkt/Queries/zorba/jsoniq/js_null_type.xq 1970-01-01 00:00:00 +0000
44+++ test/rbkt/Queries/zorba/jsoniq/js_null_type.xq 2013-05-15 12:38:15 +0000
45@@ -0,0 +1,1 @@
46+jn:null() instance of js:null
47
48=== added file 'test/rbkt/Queries/zorba/jsoniq/null_type.xq'
49--- test/rbkt/Queries/zorba/jsoniq/null_type.xq 1970-01-01 00:00:00 +0000
50+++ test/rbkt/Queries/zorba/jsoniq/null_type.xq 2013-05-15 12:38:15 +0000
51@@ -0,0 +1,2 @@
52+jsoniq version "1.0";
53+null instance of null

Subscribers

People subscribed via source and target branches

to all changes: