Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if dot is used instead of colon at the start of block #235

Open
gustason opened this issue Sep 30, 2024 · 3 comments
Open

Error if dot is used instead of colon at the start of block #235

gustason opened this issue Sep 30, 2024 · 3 comments
Assignees
Labels
blocked by 🌳 Blocked by tree-sitter implementation bug Something isn't working

Comments

@gustason
Copy link
Collaborator

Example 1:

define variable iEntries     as integer no-undo initial 4.
define variable iLine        as integer no-undo.
        
do iLine = 1 to iEntries - 1.
  message iLine.     
end.

image

Example 2:

class Testings:
  constructor public Testings(databasename as char):
    message "create " + databasename.
  end constructor.
  
  method public void stuff(  ).
    message "hi".
  end method.
end class.

image

@gustason gustason added bug Something isn't working to create 🌳 Create and link tree-sitter ticket labels Sep 30, 2024
@eglekaz
Copy link
Collaborator

eglekaz commented Oct 11, 2024

Method with a dot in the end can only be defined in an interface class and it is called a method prototype. It can't have a body.
With do block, I need more reference to register this as an issue.

@gustason please check this and provide more information if possible.

@eglekaz eglekaz added the help wanted Extra attention is needed label Oct 11, 2024
@gustason
Copy link
Collaborator Author

gustason commented Dec 11, 2024

In fact, it is always possible to replace the colon with a dot (even though it is very much not recommended!), and the code compiles and functions correctly. The code I gave in the examples was from different codebases. I would say that this should be parsed by the tree-sitter.

@eglekaz
Copy link
Collaborator

eglekaz commented Dec 12, 2024

Registered: usagi-coffee/tree-sitter-abl#105

@eglekaz eglekaz assigned eglekaz and unassigned gustason Dec 12, 2024
@eglekaz eglekaz added blocked by 🌳 Blocked by tree-sitter implementation and removed help wanted Extra attention is needed to create 🌳 Create and link tree-sitter ticket labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by 🌳 Blocked by tree-sitter implementation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants