Skip to content

Commit

Permalink
fix(#2806): removed mixing notations in vmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Mar 1, 2024
1 parent 21803cd commit edc4c7b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 63 deletions.
24 changes: 3 additions & 21 deletions eo-parser/src/main/antlr4/org/eolang/parser/Eo.g4
Original file line number Diff line number Diff line change
Expand Up @@ -420,22 +420,13 @@ vmethodOptional
// So in order to avoid it this block was described in more detail
// Head of vertical method can be:
// 1. vertical method
// 2. horizontal method
// 3. vertical application
// 4. horizontal application. The same logic as with a vertical application
// 5. just an object reference
// 2. vertical application
// 3. just an object reference
// Ends on the next line
vmethodHead
: vmethodHead methodTailOptional vmethodHeadApplicationTail
| vmethodHeadVapplication
| vmethodHeadCurrent EOL
;

// Head of vertical method that ends on the current line
vmethodHeadCurrent
: vmethodHeadHapplication
| vmethodHeadHmethodExtended
| justNamed
| justNamed EOL
;

methodTailOptional
Expand All @@ -448,22 +439,13 @@ vmethodHeadApplicationTail
| happlicationTail oname? EOL
;

vmethodHeadHmethodExtended
: hmethodOptional oname?
;

// Vertical application as head of vertical method
// Ends on the next line
vmethodHeadVapplication
: (applicable | hmethodOptional | versioned) oname? vapplicationArgs
| reversed oname? vapplicationArgsReversed
;

vmethodHeadHapplication
: (applicable | hmethodExtended) happlicationTail oname?
| happlicationReversed oname?
;

// Tail of method
methodTail
: DOT finisherCopied
Expand Down
30 changes: 0 additions & 30 deletions eo-parser/src/main/java/org/eolang/parser/XeEoListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -963,16 +963,6 @@ public void exitVmethodHead(final EoParser.VmethodHeadContext ctx) {
// Nothing here
}

@Override
public void enterVmethodHeadCurrent(final EoParser.VmethodHeadCurrentContext ctx) {
// Nothing here
}

@Override
public void exitVmethodHeadCurrent(final EoParser.VmethodHeadCurrentContext ctx) {
// Nothing here
}

@Override
public void enterMethodTailOptional(final EoParser.MethodTailOptionalContext ctx) {
// Nothing here
Expand All @@ -993,16 +983,6 @@ public void exitVmethodHeadApplicationTail(final EoParser.VmethodHeadApplication
// Nothing here
}

@Override
public void enterVmethodHeadHmethodExtended(final EoParser.VmethodHeadHmethodExtendedContext ctx) {
// Nothing here
}

@Override
public void exitVmethodHeadHmethodExtended(final EoParser.VmethodHeadHmethodExtendedContext ctx) {
// Nothing here
}

@Override
public void enterVmethodHeadVapplication(final EoParser.VmethodHeadVapplicationContext ctx) {
// Nothing here
Expand All @@ -1013,16 +993,6 @@ public void exitVmethodHeadVapplication(final EoParser.VmethodHeadVapplicationCo
// Nothing here
}

@Override
public void enterVmethodHeadHapplication(final EoParser.VmethodHeadHapplicationContext ctx) {
// Nothing here
}

@Override
public void exitVmethodHeadHapplication(final EoParser.VmethodHeadHapplicationContext ctx) {
// Nothing here
}

@Override
public void enterMethodTail(final EoParser.MethodTailContext ctx) {
// Nothing here
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line: 2
eo: |
a
.b.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line: 2
eo: |
x y
.z
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
line: 2
eo: |
x.y
.z
3 changes: 2 additions & 1 deletion eo-runtime/src/test/eo/org/eolang/ram-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
write.
r.slice 200 13 > s
"Hello, world!".as-bytes
s.slice 0 5
s
.slice 0 5
.slice 0 4
.slice 0 1
eq. > @
Expand Down

0 comments on commit edc4c7b

Please sign in to comment.