Skip to content

Commit 4ca49ba

Browse files
committed
add tests
1 parent 8b77c60 commit 4ca49ba

File tree

8 files changed

+860
-119
lines changed

8 files changed

+860
-119
lines changed

src/lexer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const lexer = function (engine) {
2929
this.mode_eval = false;
3030
this.asp_tags = false;
3131
this.short_tags = false;
32-
this.version = 704;
32+
this.version = 800;
3333
this.yyprevcol = 0;
3434
this.keywords = {
3535
__class__: this.tok.T_CLASS_C,

src/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const parser = function (lexer, ast) {
3333
this.token = null;
3434
this.prev = null;
3535
this.debug = false;
36-
this.version = 704;
36+
this.version = 800;
3737
this.extractDoc = false;
3838
this.extractTokens = false;
3939
this.suppressErrors = false;

test/snapshot/__snapshots__/call.test.js.snap

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,69 @@ Program {
793793
}
794794
`;
795795

796+
exports[`Test call nullsafepropertylookup (2) 1`] = `
797+
Program {
798+
"children": Array [
799+
ExpressionStatement {
800+
"expression": Call {
801+
"arguments": Array [],
802+
"kind": "call",
803+
"what": PropertyLookup {
804+
"kind": "nullsafepropertylookup",
805+
"offset": Identifier {
806+
"kind": "identifier",
807+
"name": "call",
808+
},
809+
"what": PropertyLookup {
810+
"kind": "nullsafepropertylookup",
811+
"offset": Identifier {
812+
"kind": "identifier",
813+
"name": "property",
814+
},
815+
"what": Variable {
816+
"curly": false,
817+
"kind": "variable",
818+
"name": "obj",
819+
},
820+
},
821+
},
822+
},
823+
"kind": "expressionstatement",
824+
},
825+
],
826+
"errors": Array [],
827+
"kind": "program",
828+
}
829+
`;
830+
831+
exports[`Test call nullsafepropertylookup 1`] = `
832+
Program {
833+
"children": Array [
834+
ExpressionStatement {
835+
"expression": Call {
836+
"arguments": Array [],
837+
"kind": "call",
838+
"what": PropertyLookup {
839+
"kind": "nullsafepropertylookup",
840+
"offset": Identifier {
841+
"kind": "identifier",
842+
"name": "call",
843+
},
844+
"what": Variable {
845+
"curly": false,
846+
"kind": "variable",
847+
"name": "obj",
848+
},
849+
},
850+
},
851+
"kind": "expressionstatement",
852+
},
853+
],
854+
"errors": Array [],
855+
"kind": "program",
856+
}
857+
`;
858+
796859
exports[`Test call offsetlookup 1`] = `
797860
Program {
798861
"children": Array [

0 commit comments

Comments
 (0)