← Back to team overview

zorba-coders team mailing list archive

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

 

Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/null-type-fix into lp:~zorba-coders/zorba/new-jsoniq.

Commit message:
Fixing null type parsing.

Requested reviews:
  Chris Hillery (ceejatec)
  Nicolae Brinza (nbrinza)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163902

Fixing null type parsing.
-- 
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163902
Your team Zorba Coders is subscribed to branch lp:~zorba-coders/zorba/new-jsoniq.
=== modified file 'src/compiler/parser/parser.y'
--- src/compiler/parser/parser.y	2013-05-13 15:02:42 +0000
+++ src/compiler/parser/parser.y	2013-05-15 12:38:15 +0000
@@ -5451,6 +5451,12 @@
     {
       $$ = new GeneralizedAtomicType( LOC(@$), static_cast<QName*>($1) );
     }
+#ifdef JSONIQ_PARSER        
+|   NULL_TOKEN
+    {
+      $$ = new GeneralizedAtomicType( LOC(@$), new QName(LOC(@$), "null") );
+    }
+#endif
 ;
 
 

=== modified file 'src/context/root_static_context.cpp'
--- src/context/root_static_context.cpp	2013-04-08 19:44:58 +0000
+++ src/context/root_static_context.cpp	2013-05-15 12:38:15 +0000
@@ -140,6 +140,7 @@
     "fn", static_context::W3C_FN_NS,
 #ifdef ZORBA_WITH_JSON
     "jn", static_context::JSONIQ_FN_NS,
+    "js", static_context::JSONIQ_DM_NS,
 #endif
     "local", XQUERY_LOCAL_FN_NS,
     "xml", XML_NS,

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res	2013-05-15 12:38:15 +0000
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res	2013-05-15 12:38:15 +0000
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/Queries/zorba/jsoniq/js_null_type.xq'
--- test/rbkt/Queries/zorba/jsoniq/js_null_type.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/js_null_type.xq	2013-05-15 12:38:15 +0000
@@ -0,0 +1,1 @@
+jn:null() instance of js:null

=== added file 'test/rbkt/Queries/zorba/jsoniq/null_type.xq'
--- test/rbkt/Queries/zorba/jsoniq/null_type.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/null_type.xq	2013-05-15 12:38:15 +0000
@@ -0,0 +1,2 @@
+jsoniq version "1.0";
+null instance of null


Follow ups