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

Fix handle_existing_function #162

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

akihiro17
Copy link
Contributor

related to https://github.com/users/Ph0enixKM/projects/2/views/1?pane=issue&itemId=64542562

I think the handle_existing_function only needs to check if the function already exists.

script

fun Foo() {
    echo "Hello"
}

Foo()
Foo()

before

 WARN 
Identifier 'Foo' is not in snake case
at func.ab:1:5


We recommend using snake case with either all uppercase or all lowercase letters for consistency.
To disable this warning use 'allow_camel_case' compiler flag

1| fun Foo() {
2|     echo "Hello"
 WARN 
Identifier 'Foo' is not in snake case
at func.ab:1:5


We recommend using snake case with either all uppercase or all lowercase letters for consistency.
To disable this warning use 'allow_camel_case' compiler flag

1| fun Foo() {
2|     echo "Hello"
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello
Hello

after

 WARN 
Identifier 'Foo' is not in snake case
at func.ab:1:5


We recommend using snake case with either all uppercase or all lowercase letters for consistency.
To disable this warning use 'allow_camel_case' compiler flag

1| fun Foo() {
2|     echo "Hello"
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Hello
Hello

``

@Ph0enixKM Ph0enixKM linked an issue Jun 9, 2024 that may be closed by this pull request
Copy link
Member

@Ph0enixKM Ph0enixKM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ph0enixKM Ph0enixKM merged commit f70827d into amber-lang:master Jun 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 Snake case warnings should appear once for each new identifier
2 participants