Added single line backslashed lines to lexer

master
Allen Webster 2020-05-01 21:26:06 -07:00
parent 88af8b02fb
commit b3b4300e4f
3 changed files with 414 additions and 379 deletions

File diff suppressed because it is too large Load Diff

View File

@ -352,6 +352,7 @@ build_language_model(void){
AddState(comment_block_try_close);
AddState(comment_block_newline);
AddState(comment_line);
AddState(comment_line_backslashing);
Operator_Set *main_ops_without_dot_or_slash = smo_copy_op_set(main_ops);
smo_remove_ops_with_prefix(main_ops_without_dot_or_slash, ".");
@ -1131,6 +1132,11 @@ build_language_model(void){
sm_emit_handler_direct("LineComment");
sm_case_eof_peek(emit);
}
sm_case("\\", comment_line_backslashing);
sm_fallback(comment_line);
sm_select_state(comment_line_backslashing);
sm_case("\r", comment_line_backslashing);
sm_fallback(comment_line);
}

View File

@ -22,6 +22,7 @@
+ Fix: on mac full screen flag -F does not cause a crash
+ Fix: auto-indenting multi-line tokens does not shift them for being in incomplete statements.
+ Fix: lexer does not exit a line continuation from backslash when it is followed by a CR
+ Fix: lexer understands backslash at end of single line comment as continuation to next line
4.1.4
+ MAJOR: The clipboard history is now a fully custom layer implemented system. Users maintaining a customization layer should try to update their call sites to the old clipboard API. #define FCODER_TRANSITION_TO 4001004 to disable the transitional function wrappers when you are ready to make the transition.