From 41514bc38ec5aa34ec64ad3eaf292de204ae6e74 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 30 Nov 2020 11:15:13 -0800 Subject: [PATCH] misc/vim: parse string types. --- misc/vim/syntax/factor.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/vim/syntax/factor.vim b/misc/vim/syntax/factor.vim index 40abc6e859..6f72171d49 100644 --- a/misc/vim/syntax/factor.vim +++ b/misc/vim/syntax/factor.vim @@ -65,14 +65,12 @@ syn cluster factorCluster contains=@factorComment,@factorClusterNoComm " " The "lexer" vocabulary parses lines (arrays of strings) into tokens. " Tokens are non-space strings, effectively words. -" "[ f skip ] call( i seq -- n )" finds the next space, erroring on tabs. -" "t skip" finds the next non-space. " The "lexer" class holds lex state. -" Lexer method "skip-word" advances to the next space (via "f skip"), +" Lexer method "skip-word" advances to the next space " while also counting leading double quotation marks as their own words. " I.e., this advances to the end of the current token " (if currently at a token, otherwise nothing changes). -" Method "skip-blank" advances to the next non-space (via "t skip"), +" Method "skip-blank" advances to the next non-space " while also skipping shebangs at the beginning of the first line. " I.e., this advances to the start of the next token " (if one is present, otherwise it advances to the line's end). @@ -152,7 +150,7 @@ syn match factorEscape /\v\\([\\astnrbvf0e\"]|u\x{6}|u\{\S+}|x\x{2} syn region factorString matchgroup=factorStringDelims start=/\v<"/ skip=/\v\\"/ end=/\v"/ contains=factorEscape " Removed Factor syntax. syn region factorTriString matchgroup=factorTriStringDelims start=/\v<"""/ skip=/\v\\"/ end=/\v"""/ contains=factorEscape -syn region factorPrefixedString matchgroup=factorPrefixedStringDelims start=/\v<[^[:blank:]"]+">/ skip=/\v\\"/ end=/\v"/ contains=factorEscape +syn region factorPrefixedString matchgroup=factorPrefixedStringDelims start=/\v<[^[:blank:]"]+"/ skip=/\v\\"/ end=/\v"/ contains=factorEscape " Vocabulary: multiline " This vocabulary reads the ambient lexer without "parse-raw". -- 2.34.1