Skip to content

Commit

Permalink
Merge pull request #26 in LFOR/fhirpath.js from bugfix/LF-1710/eval-s…
Browse files Browse the repository at this point in the history
…ingleton to master

* commit '25cd69ec81af6084d68a4b711787cda62e437550':
  minor changes (removed optional flags)
  Bump ini from 1.3.5 to 1.3.8 in /demo
  Bump y18n from 4.0.0 to 4.0.1 in /demo
  Bump y18n from 4.0.0 to 4.0.1
  Removed implicit conversion for singleton evaluation of collections which was added in error in a previous commit
  Removed ignoring the unknown part of the expression
  Fixed evaluation of singleton collections
  • Loading branch information
yuriy-sedinkin committed Mar 30, 2021
2 parents 78ed654 + 25cd69e commit c584637
Show file tree
Hide file tree
Showing 17 changed files with 392 additions and 299 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
This log documents significant changes for each release. This project follows
[Semantic Versioning](http://semver.org/).

## [2.7.4] - 2021-03-12
### Fixed
- Evaluation of singleton collections.
- Removed ignoring the unknown part of the expression.

## [2.7.3] - 2021-02-02
### Fixed
- $this wasn't set correctly if it is not used in an operator expression
Expand Down
12 changes: 3 additions & 9 deletions demo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhirpath",
"version": "2.7.3",
"version": "2.7.4",
"description": "A FHIRPath engine",
"main": "src/fhirpath.js",
"dependencies": {
Expand Down
13 changes: 7 additions & 6 deletions src/existence.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// This file holds code to hande the FHIRPath Existence functions (5.1 in the
// specification).

var util = require("./utilities");
var filtering = require("./filtering");
const util = require("./utilities");
const filtering = require("./filtering");
const misc = require("./misc");

var engine = {};
const engine = {};
engine.emptyFn = util.isEmpty;

engine.notFn = function(x) {
let d;
return (x.length === 1 && typeof (d=util.valData(x[0])) === 'boolean') ? !d : [];
engine.notFn = function(coll) {
let d = misc.singleton(coll, 'Boolean');
return (typeof (d) === 'boolean') ? !d : [];
};

engine.existsMacro = function(coll, expr) {
Expand Down
46 changes: 2 additions & 44 deletions src/fhirpath.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,37 +386,6 @@ engine.realizeParams = function(ctx, parentData, args) {
}
};

const paramTable = {
"Integer": function(val){
let d = util.valData(val);
if(typeof d !== "number" || !Number.isInteger(d)){
throw new Error("Expected integer, got: " + JSON.stringify(d));
}
return d;
},
"Boolean": function(val){
let d = util.valData(val);
if (d === true || d === false) {
return d;
}
throw new Error("Expected boolean, got: " + JSON.stringify(d));
},
"Number": function(val){
let d = util.valData(val);
if(typeof d !== "number"){
throw new Error("Expected number, got: " + JSON.stringify(d));
}
return d;
},
"String": function(val){
let d = util.valData(val);
if(typeof d !== "string"){
throw new Error("Expected string, got: " + JSON.stringify(d));
}
return d;
}
};

function makeParam(ctx, parentData, type, param) {
if(type === "Expr"){
return function(data) {
Expand Down Expand Up @@ -452,19 +421,7 @@ function makeParam(ctx, parentData, type, param) {
type = type[0];
}
}
var maker = paramTable[type];
if(res.length > 1){
throw new Error("Unexpected collection" + JSON.stringify(res) +
"; expected singleton of type " + type);
}
if(res.length == 0){
return [];
} else if(maker){
return maker(res[0]);
} else {
console.error(type, param);
throw new Error("IMPL me for " + type);
}
return misc.singleton(res, type);
}

function doInvoke(ctx, fnName, data, rawParams){
Expand Down Expand Up @@ -607,6 +564,7 @@ engine.evalTable = { // not every evaluator is listed if they are defined on eng
TypeExpression: engine.AliasOpExpression({"is": "isOp"}),
MembershipExpression: engine.AliasOpExpression({"contains": "containsOp", "in": "inOp"}),
NullLiteral: engine.NullLiteral,
EntireExpression: engine.InvocationTerm,
InvocationTerm: engine.InvocationTerm,
LiteralTerm: engine.LiteralTerm,
MemberInvocation: engine.MemberInvocation,
Expand Down
54 changes: 54 additions & 0 deletions src/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,58 @@ engine.createConvertsToFn = function (toFunction, type) {
};
};

const singletonEvalByType = {
"Integer": function(coll){
const d = util.valData(coll[0]);
if (Number.isInteger(d)) {
return d;
}
},
"Boolean": function(coll){
const d = util.valData(coll[0]);
if (d === true || d === false) {
return d;
} else if (coll.length === 1) {
return true;
}
},
"Number": function(coll) {
const d = util.valData(coll[0]);
if (typeof d === "number") {
return d;
}
},
"String": function(coll){
const d = util.valData(coll[0]);
if (typeof d === "string") {
return d;
}
}
};

/**
* Converts a collection to a singleton of the specified type.
* See http://hl7.org/fhirpath/#singleton-evaluation-of-collections for details.
* @param {Array} coll - collection
* @param {string} type - 'Integer', 'Boolean', 'Number' or 'String'
* @return {*}
*/
engine.singleton = function (coll, type) {
if(coll.length > 1){
throw new Error("Unexpected collection" + JSON.stringify(coll) +
"; expected singleton of type " + type);
} else if (coll.length === 0) {
return [];
}
const toSingleton = singletonEvalByType[type];
if (toSingleton) {
const value = toSingleton(coll);
if (value !== undefined) {
return value;
}
throw new Error(`Expected ${type.toLowerCase()}, got: ${JSON.stringify(coll)}`);
}
throw new Error('Not supported type ' + type);
};

module.exports = engine;
3 changes: 3 additions & 0 deletions src/parser/FHIRPath.g4
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ grammar FHIRPath;

//prog: line (line)*;
//line: ID ( '(' expr ')') ':' expr '\r'? '\n';
entireExpression
: expression EOF
;

expression
: term #termExpression
Expand Down
3 changes: 2 additions & 1 deletion src/parser/generated/FHIRPath.interp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ COMMENT
LINE_COMMENT

rule names:
entireExpression
expression
term
literal
Expand All @@ -148,4 +149,4 @@ identifier


atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 65, 151, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 35, 10, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 7, 2, 75, 10, 2, 12, 2, 14, 2, 78, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 87, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 97, 10, 4, 3, 5, 3, 5, 3, 5, 5, 5, 102, 10, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 109, 10, 6, 3, 7, 3, 7, 3, 7, 5, 7, 114, 10, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 7, 8, 121, 10, 8, 12, 8, 14, 8, 124, 11, 8, 3, 9, 3, 9, 5, 9, 128, 10, 9, 3, 10, 3, 10, 3, 10, 5, 10, 133, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 7, 14, 144, 10, 14, 12, 14, 14, 14, 147, 11, 14, 3, 15, 3, 15, 3, 15, 2, 3, 2, 16, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 2, 14, 3, 2, 6, 7, 3, 2, 8, 11, 4, 2, 6, 7, 12, 12, 3, 2, 14, 17, 3, 2, 20, 23, 3, 2, 24, 25, 3, 2, 27, 28, 3, 2, 18, 19, 3, 2, 34, 35, 3, 2, 41, 48, 3, 2, 49, 56, 5, 2, 18, 19, 24, 25, 59, 60, 2, 169, 2, 34, 3, 2, 2, 2, 4, 86, 3, 2, 2, 2, 6, 96, 3, 2, 2, 2, 8, 98, 3, 2, 2, 2, 10, 108, 3, 2, 2, 2, 12, 110, 3, 2, 2, 2, 14, 117, 3, 2, 2, 2, 16, 125, 3, 2, 2, 2, 18, 132, 3, 2, 2, 2, 20, 134, 3, 2, 2, 2, 22, 136, 3, 2, 2, 2, 24, 138, 3, 2, 2, 2, 26, 140, 3, 2, 2, 2, 28, 148, 3, 2, 2, 2, 30, 31, 8, 2, 1, 2, 31, 35, 5, 4, 3, 2, 32, 33, 9, 2, 2, 2, 33, 35, 5, 2, 2, 13, 34, 30, 3, 2, 2, 2, 34, 32, 3, 2, 2, 2, 35, 76, 3, 2, 2, 2, 36, 37, 12, 12, 2, 2, 37, 38, 9, 3, 2, 2, 38, 75, 5, 2, 2, 13, 39, 40, 12, 11, 2, 2, 40, 41, 9, 4, 2, 2, 41, 75, 5, 2, 2, 12, 42, 43, 12, 10, 2, 2, 43, 44, 7, 13, 2, 2, 44, 75, 5, 2, 2, 11, 45, 46, 12, 9, 2, 2, 46, 47, 9, 5, 2, 2, 47, 75, 5, 2, 2, 10, 48, 49, 12, 7, 2, 2, 49, 50, 9, 6, 2, 2, 50, 75, 5, 2, 2, 8, 51, 52, 12, 6, 2, 2, 52, 53, 9, 7, 2, 2, 53, 75, 5, 2, 2, 7, 54, 55, 12, 5, 2, 2, 55, 56, 7, 26, 2, 2, 56, 75, 5, 2, 2, 6, 57, 58, 12, 4, 2, 2, 58, 59, 9, 8, 2, 2, 59, 75, 5, 2, 2, 5, 60, 61, 12, 3, 2, 2, 61, 62, 7, 29, 2, 2, 62, 75, 5, 2, 2, 4, 63, 64, 12, 15, 2, 2, 64, 65, 7, 3, 2, 2, 65, 75, 5, 10, 6, 2, 66, 67, 12, 14, 2, 2, 67, 68, 7, 4, 2, 2, 68, 69, 5, 2, 2, 2, 69, 70, 7, 5, 2, 2, 70, 75, 3, 2, 2, 2, 71, 72, 12, 8, 2, 2, 72, 73, 9, 9, 2, 2, 73, 75, 5, 24, 13, 2, 74, 36, 3, 2, 2, 2, 74, 39, 3, 2, 2, 2, 74, 42, 3, 2, 2, 2, 74, 45, 3, 2, 2, 2, 74, 48, 3, 2, 2, 2, 74, 51, 3, 2, 2, 2, 74, 54, 3, 2, 2, 2, 74, 57, 3, 2, 2, 2, 74, 60, 3, 2, 2, 2, 74, 63, 3, 2, 2, 2, 74, 66, 3, 2, 2, 2, 74, 71, 3, 2, 2, 2, 75, 78, 3, 2, 2, 2, 76, 74, 3, 2, 2, 2, 76, 77, 3, 2, 2, 2, 77, 3, 3, 2, 2, 2, 78, 76, 3, 2, 2, 2, 79, 87, 5, 10, 6, 2, 80, 87, 5, 6, 4, 2, 81, 87, 5, 8, 5, 2, 82, 83, 7, 30, 2, 2, 83, 84, 5, 2, 2, 2, 84, 85, 7, 31, 2, 2, 85, 87, 3, 2, 2, 2, 86, 79, 3, 2, 2, 2, 86, 80, 3, 2, 2, 2, 86, 81, 3, 2, 2, 2, 86, 82, 3, 2, 2, 2, 87, 5, 3, 2, 2, 2, 88, 89, 7, 32, 2, 2, 89, 97, 7, 33, 2, 2, 90, 97, 9, 10, 2, 2, 91, 97, 7, 61, 2, 2, 92, 97, 7, 62, 2, 2, 93, 97, 7, 57, 2, 2, 94, 97, 7, 58, 2, 2, 95, 97, 5, 16, 9, 2, 96, 88, 3, 2, 2, 2, 96, 90, 3, 2, 2, 2, 96, 91, 3, 2, 2, 2, 96, 92, 3, 2, 2, 2, 96, 93, 3, 2, 2, 2, 96, 94, 3, 2, 2, 2, 96, 95, 3, 2, 2, 2, 97, 7, 3, 2, 2, 2, 98, 101, 7, 36, 2, 2, 99, 102, 5, 28, 15, 2, 100, 102, 7, 61, 2, 2, 101, 99, 3, 2, 2, 2, 101, 100, 3, 2, 2, 2, 102, 9, 3, 2, 2, 2, 103, 109, 5, 28, 15, 2, 104, 109, 5, 12, 7, 2, 105, 109, 7, 37, 2, 2, 106, 109, 7, 38, 2, 2, 107, 109, 7, 39, 2, 2, 108, 103, 3, 2, 2, 2, 108, 104, 3, 2, 2, 2, 108, 105, 3, 2, 2, 2, 108, 106, 3, 2, 2, 2, 108, 107, 3, 2, 2, 2, 109, 11, 3, 2, 2, 2, 110, 111, 5, 28, 15, 2, 111, 113, 7, 30, 2, 2, 112, 114, 5, 14, 8, 2, 113, 112, 3, 2, 2, 2, 113, 114, 3, 2, 2, 2, 114, 115, 3, 2, 2, 2, 115, 116, 7, 31, 2, 2, 116, 13, 3, 2, 2, 2, 117, 122, 5, 2, 2, 2, 118, 119, 7, 40, 2, 2, 119, 121, 5, 2, 2, 2, 120, 118, 3, 2, 2, 2, 121, 124, 3, 2, 2, 2, 122, 120, 3, 2, 2, 2, 122, 123, 3, 2, 2, 2, 123, 15, 3, 2, 2, 2, 124, 122, 3, 2, 2, 2, 125, 127, 7, 62, 2, 2, 126, 128, 5, 18, 10, 2, 127, 126, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 17, 3, 2, 2, 2, 129, 133, 5, 20, 11, 2, 130, 133, 5, 22, 12, 2, 131, 133, 7, 61, 2, 2, 132, 129, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 132, 131, 3, 2, 2, 2, 133, 19, 3, 2, 2, 2, 134, 135, 9, 11, 2, 2, 135, 21, 3, 2, 2, 2, 136, 137, 9, 12, 2, 2, 137, 23, 3, 2, 2, 2, 138, 139, 5, 26, 14, 2, 139, 25, 3, 2, 2, 2, 140, 145, 5, 28, 15, 2, 141, 142, 7, 3, 2, 2, 142, 144, 5, 28, 15, 2, 143, 141, 3, 2, 2, 2, 144, 147, 3, 2, 2, 2, 145, 143, 3, 2, 2, 2, 145, 146, 3, 2, 2, 2, 146, 27, 3, 2, 2, 2, 147, 145, 3, 2, 2, 2, 148, 149, 9, 13, 2, 2, 149, 29, 3, 2, 2, 2, 14, 34, 74, 76, 86, 96, 101, 108, 113, 122, 127, 132, 145]
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 65, 156, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 40, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 80, 10, 3, 12, 3, 14, 3, 83, 11, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 92, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 102, 10, 5, 3, 6, 3, 6, 3, 6, 5, 6, 107, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 114, 10, 7, 3, 8, 3, 8, 3, 8, 5, 8, 119, 10, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 7, 9, 126, 10, 9, 12, 9, 14, 9, 129, 11, 9, 3, 10, 3, 10, 5, 10, 133, 10, 10, 3, 11, 3, 11, 3, 11, 5, 11, 138, 10, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 7, 15, 149, 10, 15, 12, 15, 14, 15, 152, 11, 15, 3, 16, 3, 16, 3, 16, 2, 3, 4, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 2, 14, 3, 2, 6, 7, 3, 2, 8, 11, 4, 2, 6, 7, 12, 12, 3, 2, 14, 17, 3, 2, 20, 23, 3, 2, 24, 25, 3, 2, 27, 28, 3, 2, 18, 19, 3, 2, 34, 35, 3, 2, 41, 48, 3, 2, 49, 56, 5, 2, 18, 19, 24, 25, 59, 60, 2, 173, 2, 32, 3, 2, 2, 2, 4, 39, 3, 2, 2, 2, 6, 91, 3, 2, 2, 2, 8, 101, 3, 2, 2, 2, 10, 103, 3, 2, 2, 2, 12, 113, 3, 2, 2, 2, 14, 115, 3, 2, 2, 2, 16, 122, 3, 2, 2, 2, 18, 130, 3, 2, 2, 2, 20, 137, 3, 2, 2, 2, 22, 139, 3, 2, 2, 2, 24, 141, 3, 2, 2, 2, 26, 143, 3, 2, 2, 2, 28, 145, 3, 2, 2, 2, 30, 153, 3, 2, 2, 2, 32, 33, 5, 4, 3, 2, 33, 34, 7, 2, 2, 3, 34, 3, 3, 2, 2, 2, 35, 36, 8, 3, 1, 2, 36, 40, 5, 6, 4, 2, 37, 38, 9, 2, 2, 2, 38, 40, 5, 4, 3, 13, 39, 35, 3, 2, 2, 2, 39, 37, 3, 2, 2, 2, 40, 81, 3, 2, 2, 2, 41, 42, 12, 12, 2, 2, 42, 43, 9, 3, 2, 2, 43, 80, 5, 4, 3, 13, 44, 45, 12, 11, 2, 2, 45, 46, 9, 4, 2, 2, 46, 80, 5, 4, 3, 12, 47, 48, 12, 10, 2, 2, 48, 49, 7, 13, 2, 2, 49, 80, 5, 4, 3, 11, 50, 51, 12, 9, 2, 2, 51, 52, 9, 5, 2, 2, 52, 80, 5, 4, 3, 10, 53, 54, 12, 7, 2, 2, 54, 55, 9, 6, 2, 2, 55, 80, 5, 4, 3, 8, 56, 57, 12, 6, 2, 2, 57, 58, 9, 7, 2, 2, 58, 80, 5, 4, 3, 7, 59, 60, 12, 5, 2, 2, 60, 61, 7, 26, 2, 2, 61, 80, 5, 4, 3, 6, 62, 63, 12, 4, 2, 2, 63, 64, 9, 8, 2, 2, 64, 80, 5, 4, 3, 5, 65, 66, 12, 3, 2, 2, 66, 67, 7, 29, 2, 2, 67, 80, 5, 4, 3, 4, 68, 69, 12, 15, 2, 2, 69, 70, 7, 3, 2, 2, 70, 80, 5, 12, 7, 2, 71, 72, 12, 14, 2, 2, 72, 73, 7, 4, 2, 2, 73, 74, 5, 4, 3, 2, 74, 75, 7, 5, 2, 2, 75, 80, 3, 2, 2, 2, 76, 77, 12, 8, 2, 2, 77, 78, 9, 9, 2, 2, 78, 80, 5, 26, 14, 2, 79, 41, 3, 2, 2, 2, 79, 44, 3, 2, 2, 2, 79, 47, 3, 2, 2, 2, 79, 50, 3, 2, 2, 2, 79, 53, 3, 2, 2, 2, 79, 56, 3, 2, 2, 2, 79, 59, 3, 2, 2, 2, 79, 62, 3, 2, 2, 2, 79, 65, 3, 2, 2, 2, 79, 68, 3, 2, 2, 2, 79, 71, 3, 2, 2, 2, 79, 76, 3, 2, 2, 2, 80, 83, 3, 2, 2, 2, 81, 79, 3, 2, 2, 2, 81, 82, 3, 2, 2, 2, 82, 5, 3, 2, 2, 2, 83, 81, 3, 2, 2, 2, 84, 92, 5, 12, 7, 2, 85, 92, 5, 8, 5, 2, 86, 92, 5, 10, 6, 2, 87, 88, 7, 30, 2, 2, 88, 89, 5, 4, 3, 2, 89, 90, 7, 31, 2, 2, 90, 92, 3, 2, 2, 2, 91, 84, 3, 2, 2, 2, 91, 85, 3, 2, 2, 2, 91, 86, 3, 2, 2, 2, 91, 87, 3, 2, 2, 2, 92, 7, 3, 2, 2, 2, 93, 94, 7, 32, 2, 2, 94, 102, 7, 33, 2, 2, 95, 102, 9, 10, 2, 2, 96, 102, 7, 61, 2, 2, 97, 102, 7, 62, 2, 2, 98, 102, 7, 57, 2, 2, 99, 102, 7, 58, 2, 2, 100, 102, 5, 18, 10, 2, 101, 93, 3, 2, 2, 2, 101, 95, 3, 2, 2, 2, 101, 96, 3, 2, 2, 2, 101, 97, 3, 2, 2, 2, 101, 98, 3, 2, 2, 2, 101, 99, 3, 2, 2, 2, 101, 100, 3, 2, 2, 2, 102, 9, 3, 2, 2, 2, 103, 106, 7, 36, 2, 2, 104, 107, 5, 30, 16, 2, 105, 107, 7, 61, 2, 2, 106, 104, 3, 2, 2, 2, 106, 105, 3, 2, 2, 2, 107, 11, 3, 2, 2, 2, 108, 114, 5, 30, 16, 2, 109, 114, 5, 14, 8, 2, 110, 114, 7, 37, 2, 2, 111, 114, 7, 38, 2, 2, 112, 114, 7, 39, 2, 2, 113, 108, 3, 2, 2, 2, 113, 109, 3, 2, 2, 2, 113, 110, 3, 2, 2, 2, 113, 111, 3, 2, 2, 2, 113, 112, 3, 2, 2, 2, 114, 13, 3, 2, 2, 2, 115, 116, 5, 30, 16, 2, 116, 118, 7, 30, 2, 2, 117, 119, 5, 16, 9, 2, 118, 117, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 120, 121, 7, 31, 2, 2, 121, 15, 3, 2, 2, 2, 122, 127, 5, 4, 3, 2, 123, 124, 7, 40, 2, 2, 124, 126, 5, 4, 3, 2, 125, 123, 3, 2, 2, 2, 126, 129, 3, 2, 2, 2, 127, 125, 3, 2, 2, 2, 127, 128, 3, 2, 2, 2, 128, 17, 3, 2, 2, 2, 129, 127, 3, 2, 2, 2, 130, 132, 7, 62, 2, 2, 131, 133, 5, 20, 11, 2, 132, 131, 3, 2, 2, 2, 132, 133, 3, 2, 2, 2, 133, 19, 3, 2, 2, 2, 134, 138, 5, 22, 12, 2, 135, 138, 5, 24, 13, 2, 136, 138, 7, 61, 2, 2, 137, 134, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 137, 136, 3, 2, 2, 2, 138, 21, 3, 2, 2, 2, 139, 140, 9, 11, 2, 2, 140, 23, 3, 2, 2, 2, 141, 142, 9, 12, 2, 2, 142, 25, 3, 2, 2, 2, 143, 144, 5, 28, 15, 2, 144, 27, 3, 2, 2, 2, 145, 150, 5, 30, 16, 2, 146, 147, 7, 3, 2, 2, 147, 149, 5, 30, 16, 2, 148, 146, 3, 2, 2, 2, 149, 152, 3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 150, 151, 3, 2, 2, 2, 151, 29, 3, 2, 2, 2, 152, 150, 3, 2, 2, 2, 153, 154, 9, 13, 2, 2, 154, 31, 3, 2, 2, 2, 14, 39, 79, 81, 91, 101, 106, 113, 118, 127, 132, 137, 150]
9 changes: 9 additions & 0 deletions src/parser/generated/FHIRPathListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ function FHIRPathListener() {
FHIRPathListener.prototype = Object.create(antlr4.tree.ParseTreeListener.prototype);
FHIRPathListener.prototype.constructor = FHIRPathListener;

// Enter a parse tree produced by FHIRPathParser#entireExpression.
FHIRPathListener.prototype.enterEntireExpression = function(ctx) {
};

// Exit a parse tree produced by FHIRPathParser#entireExpression.
FHIRPathListener.prototype.exitEntireExpression = function(ctx) {
};


// Enter a parse tree produced by FHIRPathParser#indexerExpression.
FHIRPathListener.prototype.enterIndexerExpression = function(ctx) {
};
Expand Down
Loading

0 comments on commit c584637

Please sign in to comment.