git.delta.rocks / jrsonnet / refs/commits / 69c08119b19c

difftreelog

feat different names for strings and comments

wvmwvnroYaroslav Bolyukin2026-04-04parent: #b857448.patch.diff
in: master

5 files changed

modifiedcrates/jrsonnet-lexer/src/generated/syntax_kinds.rsdiffbeforeafterboth
--- a/crates/jrsonnet-lexer/src/generated/syntax_kinds.rs
+++ b/crates/jrsonnet-lexer/src/generated/syntax_kinds.rs
@@ -284,29 +284,29 @@
 			ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",
 			ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",
 			ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",
-			STRING_DOUBLE => "string",
+			STRING_DOUBLE => "\"string\"",
 			ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",
-			STRING_SINGLE => "string",
+			STRING_SINGLE => "'string'",
 			ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",
-			STRING_DOUBLE_VERBATIM => "string",
+			STRING_DOUBLE_VERBATIM => "@\"string\"",
 			ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {
 				"unterminated verbatim double-quoted string"
 			}
-			STRING_SINGLE_VERBATIM => "string",
+			STRING_SINGLE_VERBATIM => "@'string'",
 			ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {
 				"unterminated verbatim single-quoted string"
 			}
 			ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",
-			STRING_BLOCK => "string",
+			STRING_BLOCK => "|||string|||",
 			ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",
 			ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",
 			ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",
 			ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",
 			IDENT => "identifier",
 			WHITESPACE => "whitespace",
-			SINGLE_LINE_SLASH_COMMENT => "comment",
-			SINGLE_LINE_HASH_COMMENT => "comment",
-			MULTI_LINE_COMMENT => "comment",
+			SINGLE_LINE_SLASH_COMMENT => "//comment",
+			SINGLE_LINE_HASH_COMMENT => "#comment",
+			MULTI_LINE_COMMENT => "/*comment*/",
 			ERROR_COMMENT_TOO_SHORT => "comment too short",
 			ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",
 			ERROR_NO_OPERATOR => "expected operator",
modifiedcrates/jrsonnet-lexer/src/lib.rsdiffbeforeafterboth
--- a/crates/jrsonnet-lexer/src/lib.rs
+++ b/crates/jrsonnet-lexer/src/lib.rs
@@ -6,5 +6,5 @@
 pub struct Span(pub u32, pub u32);
 
 pub use generated::syntax_kinds::SyntaxKind;
-pub use lex::{Lexeme, Lexer};
+pub use lex::{Lexeme, Lexer, lex};
 pub use string_block::{CollectStrBlock, collect_lexed_str_block};
modifiedcrates/jrsonnet-rowan-parser/src/generated/nodes.rsdiffbeforeafterboth
--- a/crates/jrsonnet-rowan-parser/src/generated/nodes.rs
+++ b/crates/jrsonnet-rowan-parser/src/generated/nodes.rs
@@ -3,9 +3,9 @@
 
 #![allow(non_snake_case, clippy::match_like_matches_macro)]
 use crate::{
+	ast::{support, AstChildren, AstNode, AstToken},
 	SyntaxKind::{self, *},
 	SyntaxNode, SyntaxToken, T,
-	ast::{AstChildren, AstNode, AstToken, support},
 };
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
modifiedcrates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rsdiffbeforeafterboth
--- a/crates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rs
+++ b/crates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rs
@@ -290,29 +290,29 @@
 			ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",
 			ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",
 			ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",
-			STRING_DOUBLE => "string",
+			STRING_DOUBLE => "\"string\"",
 			ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",
-			STRING_SINGLE => "string",
+			STRING_SINGLE => "'string'",
 			ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",
-			STRING_DOUBLE_VERBATIM => "string",
+			STRING_DOUBLE_VERBATIM => "@\"string\"",
 			ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {
 				"unterminated verbatim double-quoted string"
 			}
-			STRING_SINGLE_VERBATIM => "string",
+			STRING_SINGLE_VERBATIM => "@'string'",
 			ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {
 				"unterminated verbatim single-quoted string"
 			}
 			ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",
-			STRING_BLOCK => "string",
+			STRING_BLOCK => "|||string|||",
 			ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",
 			ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",
 			ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",
 			ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",
 			IDENT => "identifier",
 			WHITESPACE => "whitespace",
-			SINGLE_LINE_SLASH_COMMENT => "comment",
-			SINGLE_LINE_HASH_COMMENT => "comment",
-			MULTI_LINE_COMMENT => "comment",
+			SINGLE_LINE_SLASH_COMMENT => "//comment",
+			SINGLE_LINE_HASH_COMMENT => "#comment",
+			MULTI_LINE_COMMENT => "/*comment*/",
 			ERROR_COMMENT_TOO_SHORT => "comment too short",
 			ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",
 			ERROR_NO_OPERATOR => "expected operator",
modifiedxtask/src/sourcegen/kinds.rsdiffbeforeafterboth
120 Self::Literal { name, .. } => match name.as_str() {120 Self::Literal { name, .. } => match name.as_str() {
121 "FLOAT" => "number".to_owned(),121 "FLOAT" => "number".to_owned(),
122 "IDENT" => "identifier".to_owned(),122 "IDENT" => "identifier".to_owned(),
123 "STRING_DOUBLE"123 "STRING_DOUBLE" => "\"string\"".to_owned(),
124 | "STRING_SINGLE"124 "STRING_SINGLE" => "'string'".to_owned(),
125 | "STRING_DOUBLE_VERBATIM"125 "STRING_DOUBLE_VERBATIM" => "@\"string\"".to_owned(),
126 | "STRING_SINGLE_VERBATIM"126 "STRING_SINGLE_VERBATIM" => "@'string'".to_owned(),
127 | "STRING_BLOCK" => "string".to_owned(),127 "STRING_BLOCK" => "|||string|||".to_owned(),
128 "WHITESPACE" => "whitespace".to_owned(),128 "WHITESPACE" => "whitespace".to_owned(),
129 "SINGLE_LINE_SLASH_COMMENT" => "//comment".to_owned(),
129 "SINGLE_LINE_SLASH_COMMENT" | "SINGLE_LINE_HASH_COMMENT" | "MULTI_LINE_COMMENT" => {130 "SINGLE_LINE_HASH_COMMENT" => "#comment".to_owned(),
130 "comment".to_owned()131 "MULTI_LINE_COMMENT" => "/*comment*/".to_owned(),
131 }
132 _ => name.to_lowercase(),132 _ => name.to_lowercase(),
133 },133 },
134 Self::Meta { name, .. } => name.to_lowercase(),134 Self::Meta { name, .. } => name.to_lowercase(),