Permalink
Browse files

JSON spec: Some yadda yadda about versions.

  • Loading branch information...
1 parent b787201 commit ad302fef5776f8908178c3e12bcd7156091c466e @fredreichbier fredreichbier committed Jul 8, 2010
Showing with 34 additions and 0 deletions.
  1. +34 −0 source/compilers/json.rst
View
@@ -158,6 +158,40 @@ The following keys are somewhat special:
.. note:: ``fullName`` is given for all types except ``enumElement`` and ``field``.
+``version``
+ A version spec or null. See `version specs`_.
+
+.. note:: ``version`` is given for all entities, but will always be null for globalVariable, field and operator entities.
+
+.. _version specs:
+
+version specs
+~~~~~~~~~~~~~
+
+Version specs are represented in the tag mini language with these modifiers:
+
+.. function:: and(spec1, spec2)
+
+ Equivalent of ``version(spec1 && spec2)``
+
+.. function:: or(spec1, spec2)
+
+ Equivalent of ``version(spec1 || spec2)``
+
+.. function:: not(spec)
+
+ Equivalent of ``version(!(spec))``
+
+``spec`` can either be another sub-spec or a version name.
+
+Example::
+
+ version(!(gc && (win32 || win64)))
+
+ =>
+
+ "not(and(gc,or(win32,win64)))"
+
.. _json-function-entity:
``function``

0 comments on commit ad302fe

Please sign in to comment.