Permalink
Browse files

Allow require to be stepped through.

  • Loading branch information...
1 parent 9d8e698 commit 90b9a6e129914d6117bc1d953025764818f55306 @jnthn committed Aug 22, 2012
Showing with 17 additions and 1 deletion.
  1. +0 −1 TODO
  2. +17 −0 bin/perl6-debug.nqp
View
@@ -1,5 +1,4 @@
* Check and maybe improve statement modifier handling
* Fix elsif handling
-* Handle stepping through require
* Improve accuracy of highlighting the exception-throwing code
* Allow setting breakpoint on a routine name
View
@@ -254,6 +254,23 @@ class Perl6::HookActions is Perl6::Actions {
Perl6::Actions.statement_control:sym<when>($/);
simple_xblock_hook($/);
}
+
+ method statement_control:sym<require>($/) {
+ Perl6::Actions.statement_control:sym<require>($/);
+ if $*DEBUG_HOOKS.has_hook('statement_simple') {
+ $/.'!make'(QAST::Stmts.new(
+ QAST::Op.new(
+ :op('call'),
+ QAST::WVal.new( :value($*DEBUG_HOOKS.get_hook('statement_simple')) ),
+ $*W.add_string_constant(pir::find_caller_lex__ps('$?FILES') // '<unknown>'),
+ ps_qast(),
+ $*W.add_numeric_constant('Int', $/.from),
+ $*W.add_numeric_constant('Int', $/.to)
+ ),
+ $/.ast
+ ));
+ }
+ }
}
class Perl6::HookGrammar is Perl6::Grammar {

0 comments on commit 90b9a6e

Please sign in to comment.