diff options
author | reduz <reduzio@gmail.com> | 2015-12-29 12:11:21 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2015-12-29 12:11:21 -0300 |
commit | 7d2d1442f83e6a7a57a1823a6cf5af53e5419d5f (patch) | |
tree | 06c26e9630e74b88bc860ad8e824855e85c03791 /modules/gdscript/gd_parser.cpp | |
parent | 99736e63e45b323d06411926bd92210a08c717c2 (diff) |
-add breakpoint statement to ease with debugging, closes #3165
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r-- | modules/gdscript/gd_parser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index f924f1de31..912170d2b0 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -1862,6 +1862,17 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) { return; } } break; + case GDTokenizer::TK_PR_BREAKPOINT: { + + tokenizer->advance(); + BreakpointNode *bn = alloc_node<BreakpointNode>(); + p_block->statements.push_back(bn); + + if (!_end_statement()) { + _set_error("Expected end of statement after breakpoint."); + return; + } + } break; default: { Node *expression = _parse_and_reduce_expression(p_block,p_static,false,true); |