Permalink
Browse files

Debugger statement

  • Loading branch information...
1 parent 05026cd commit b5dc7c7139fb499934baf10e77aa8f6fd30ee361 @ghempton ghempton committed with Nov 28, 2012
View
@@ -0,0 +1,3 @@
+node_modules
+.sw[po]
+.*.sw[po]

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -843,6 +843,7 @@ class exports.Compiler
[CS.Return, ({expression: e}) -> new JS.ReturnStatement expr e]
[CS.Break, -> new JS.BreakStatement]
[CS.Continue, -> new JS.ContinueStatement]
+ [CS.Debugger, -> new JS.DebuggerStatement]
# straightforward operators
[CS.ExpOp, ({left, right}) ->
View
@@ -136,6 +136,7 @@ statement
/ continue
/ break
/ throw
+ / debugger
expression = expressionworthy / seqExpression
secondaryStatement
@@ -144,6 +145,7 @@ secondaryStatement
/ continue
/ break
/ throw
+ / debugger
// secondaryExpression forbids anything lower precedence than assignmentExpression
secondaryExpression = expressionworthy / assignmentExpression
@@ -951,7 +953,7 @@ return
}
continue = CONTINUE { return (new CS.Continue).r('continue').p(line, column, offset); }
break = BREAK { return (new CS.Break).r('break').p(line, column, offset); }
-
+debugger = DEBUGGER { return (new CS.Debugger).r('debugger').p(line, column, offset); }
undefined = UNDEFINED { return (new CS.Undefined).r('undefined').p(line, column, offset); }
null = NULL { return (new CS.Null).r('null').p(line, column, offset); }
@@ -1067,6 +1069,7 @@ CATCH = w:"catch" !identifierPart { return w; }
CONTINUE = w:"continue" !identifierPart { return w; }
CLASS = w:"class" !identifierPart { return w; }
DELETE = w:"delete" !identifierPart { return w; }
+DEBUGGER = w:"debugger" !identifierPart { return w; }
DO = w:"do" !identifierPart { return w; }
ELSE = w:"else" !identifierPart { return w; }
EXTENDS = w:"extends" !identifierPart { return w; }
View
@@ -97,6 +97,7 @@ createNodes
[]
Break: null # :: Break
Continue: null # :: Continue
+ Debugger: null # :: Debugger
Return: [['expression']] # :: Maybe Exprs -> Return
Throw: [['expression']] # :: Exprs -> Throw
]
View
@@ -84,7 +84,7 @@ mayHaveSideEffects =
-> no
]
[
- CS.Break, CS.Continue, CS.DeleteOp, CS.NewOp, CS.Return, CS.Super
+ CS.Break, CS.Continue, CS.Debugger, CS.DeleteOp, CS.NewOp, CS.Return, CS.Super
CS.PreDecrementOp, CS.PreIncrementOp, CS.PostDecrementOp, CS.PostIncrementOp
CS.ClassProtoAssignOp, CS.Constructor, CS.Throw, CS.JavaScript, CS.ExtendsOp
-> yes

0 comments on commit b5dc7c7

Please sign in to comment.