From dd820b4dd0c0221f22c347e8b8659c09182f6203 Mon Sep 17 00:00:00 2001 From: maxonfjvipon Date: Mon, 10 Jul 2023 10:28:28 +0300 Subject: [PATCH] #1602 - added syntax to use versions with full name objects --- eo-parser/src/main/antlr4/org/eolang/parser/Program.g4 | 5 +++++ .../resources/org/eolang/parser/packs/syntax/versions.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/eo-parser/src/main/antlr4/org/eolang/parser/Program.g4 b/eo-parser/src/main/antlr4/org/eolang/parser/Program.g4 index 67d05319f3..4216b441fd 100644 --- a/eo-parser/src/main/antlr4/org/eolang/parser/Program.g4 +++ b/eo-parser/src/main/antlr4/org/eolang/parser/Program.g4 @@ -140,6 +140,11 @@ application method htail? | + application + method + version + suffix? + | scope htail? | diff --git a/eo-parser/src/test/resources/org/eolang/parser/packs/syntax/versions.yaml b/eo-parser/src/test/resources/org/eolang/parser/packs/syntax/versions.yaml index 0d3cb7670d..481d5a0932 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/packs/syntax/versions.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/packs/syntax/versions.yaml @@ -5,6 +5,8 @@ tests: - //o[@base='func2' and not(@ver)] - //o[@base='func3' and @ver='3.2.1'] - //o[@base='func4' and @ver='10.20.30'] + - //o[@base='.stdout' and @ver='1.28.5'] + - //o[@base='.sprintf' and @ver='0.28.5' and @name='y'] eo: | [] > main func0|3.4.5 > x @@ -14,3 +16,6 @@ eo: | func3|3.2.1 .method func4|10.20.30 + QQ.io.stdout|1.28.5 + QQ.txt.sprintf|0.28.5 > y + "Hello world"