question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

invalid ast for `silent`

See original GitHub issue

Input:

$var = @foo() || @foo();

silent node should be before call, now it is before bin

Right output from php parser:

array(
    0: Stmt_Expression(
        expr: Expr_Assign(
            var: Expr_Variable(
                name: var
            )
            expr: Expr_BinaryOp_BooleanOr(
                left: Expr_ErrorSuppress(
                    expr: Expr_FuncCall(
                        name: Name(
                            parts: array(
                                0: foo
                            )
                        )
                        args: array(
                        )
                    )
                )
                right: Expr_ErrorSuppress(
                    expr: Expr_FuncCall(
                        name: Name(
                            parts: array(
                                0: foo
                            )
                        )
                        args: array(
                        )
                    )
                )
            )
        )
    )
)

But

$var = @(foo() || foo());

Output valid ast.

Very high priority.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ichiriaccommented, Apr 7, 2019

Hi @evilebottnawi,

$> ping ichiriac
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.

--- 127.0.0.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 12days

Sorry dude, had a lot of work to finish, I’m back on the project this week

0reactions
alexander-akaitcommented, Aug 9, 2019

Will be great if we fix some major bugs

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: Invalid AST Node when following Step-by-step Guide ...
I followed the Step-by-step Guide for v12.0.0 using the yarn-commands. Everything works fine, except when executing the very last command ...
Read more >
How to stop clang AST misinterpreting this type of function ...
I am using clang's abstract syntax tree generation to generate an AST for some source files. It maps out normal functions great, ...
Read more >
Documentation: 15: pg_ctl - PostgreSQL
pg_ctl is a utility for initializing a PostgreSQL database cluster, starting, stopping, or restarting the PostgreSQL database server (postgres), or displaying ...
Read more >
Asterisk 17 Channels REST API
Play silence to a channel. DELETE. /channels/{channelId}/silence. void. Stop playing silence to a channel.
Read more >
Groovy Language Documentation
Compatibility with AST transformations; Prefix and postfix operations ... Here are a few examples of valid identifiers (here, variable names):.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found