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

Investigate absence of tests for :dba adverb #238

Open
Altai-man opened this issue Feb 19, 2017 · 3 comments
Open

Investigate absence of tests for :dba adverb #238

Altai-man opened this issue Feb 19, 2017 · 3 comments

Comments

@Altai-man
Copy link
Member

This adverb can be found in specs and in rakudo(I'm not sure how to test it, but code like
regex { :dba('array subscript') '[' ~ ']' <expression> }
doesn't fail, but there is not tests in the roast.
Is it a part of the language? We need to test it then.

@mryan mryan self-assigned this Oct 7, 2017
@JJ
Copy link
Contributor

JJ commented May 26, 2020

Where is this defined? I can't see it here

@Altai-man
Copy link
Member Author

No idea, but it is used at e.g. https://github.com/rakudo/rakudo/blob/master/src/Perl6/Actions.nqp#L1213
So maybe nqp?

@vrurg
Copy link
Contributor

vrurg commented May 26, 2020

@Altai-man what you're referring to is purely internal thing. diessct_*longname methods return an instance of World's internal LongName class, .name is invoked upon the instance.

:dba in a grammar is different thing. As far as I know it is used by the core Grammar only. Despite being exposed to Raku Grammar at the syntax level (parsing of :dba doesn't fail) it does nothing but harm to a rule because it breaks the parsing itself. For example:

grammar TTT {
    token TOP {
        <bbb>
    }
    token bbb {
        #:dba('oops')
        "bbb"
    }
}

say TTT.parse("bbb");

Uncommenting :dba results in a failure.

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

No branches or pull requests

4 participants