Skip to content

debugger is a statement, not an expression #4482

@hpp2334

Description

@hpp2334

Describe the bug
debugger is a statement, not an expression.

To Reproduce

Case Actual Expected (Test on firefox)
!debugger true Uncaught SyntaxError: expected expression, got keyword 'debugger'
let x = debugger; undefined Uncaught SyntaxError: expected expression, got keyword 'debugger'
debugger + debugger NaN Uncaught SyntaxError: unexpected token: '+'

Build environment

Run in playground

Metadata

Metadata

Assignees

No one assigned

    Labels

    astIssue surrounding the abstract syntax treeparserIssues surrounding the parser

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions