difftreelog
feat different names for strings and comments
in: master
5 files changed
crates/jrsonnet-lexer/src/generated/syntax_kinds.rsdiffbeforeafterboth284 ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",284 ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",285 ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",285 ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",286 ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",286 ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",287 STRING_DOUBLE => "string",287 STRING_DOUBLE => "\"string\"",288 ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",288 ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",289 STRING_SINGLE => "string",289 STRING_SINGLE => "'string'",290 ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",290 ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",291 STRING_DOUBLE_VERBATIM => "string",291 STRING_DOUBLE_VERBATIM => "@\"string\"",292 ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {292 ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {293 "unterminated verbatim double-quoted string"293 "unterminated verbatim double-quoted string"294 }294 }295 STRING_SINGLE_VERBATIM => "string",295 STRING_SINGLE_VERBATIM => "@'string'",296 ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {296 ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {297 "unterminated verbatim single-quoted string"297 "unterminated verbatim single-quoted string"298 }298 }299 ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",299 ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",300 STRING_BLOCK => "string",300 STRING_BLOCK => "|||string|||",301 ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",301 ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",302 ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",302 ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",303 ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",303 ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",304 ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",304 ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",305 IDENT => "identifier",305 IDENT => "identifier",306 WHITESPACE => "whitespace",306 WHITESPACE => "whitespace",307 SINGLE_LINE_SLASH_COMMENT => "comment",307 SINGLE_LINE_SLASH_COMMENT => "//comment",308 SINGLE_LINE_HASH_COMMENT => "comment",308 SINGLE_LINE_HASH_COMMENT => "#comment",309 MULTI_LINE_COMMENT => "comment",309 MULTI_LINE_COMMENT => "/*comment*/",310 ERROR_COMMENT_TOO_SHORT => "comment too short",310 ERROR_COMMENT_TOO_SHORT => "comment too short",311 ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",311 ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",312 ERROR_NO_OPERATOR => "expected operator",312 ERROR_NO_OPERATOR => "expected operator",crates/jrsonnet-lexer/src/lib.rsdiffbeforeafterboth6pub struct Span(pub u32, pub u32);6pub struct Span(pub u32, pub u32);778pub use generated::syntax_kinds::SyntaxKind;8pub use generated::syntax_kinds::SyntaxKind;9pub use lex::{Lexeme, Lexer};9pub use lex::{Lexeme, Lexer, lex};10pub use string_block::{CollectStrBlock, collect_lexed_str_block};10pub use string_block::{CollectStrBlock, collect_lexed_str_block};1111crates/jrsonnet-rowan-parser/src/generated/nodes.rsdiffbeforeafterboth334#![allow(non_snake_case, clippy::match_like_matches_macro)]4#![allow(non_snake_case, clippy::match_like_matches_macro)]5use crate::{5use crate::{6 ast::{support, AstChildren, AstNode, AstToken},6 SyntaxKind::{self, *},7 SyntaxKind::{self, *},7 SyntaxNode, SyntaxToken, T,8 SyntaxNode, SyntaxToken, T,8 ast::{AstChildren, AstNode, AstToken, support},9};9};101011#[derive(Debug, Clone, PartialEq, Eq, Hash)]11#[derive(Debug, Clone, PartialEq, Eq, Hash)]crates/jrsonnet-rowan-parser/src/generated/syntax_kinds.rsdiffbeforeafterboth290 ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",290 ERROR_FLOAT_JUNK_AFTER_POINT => "junk after decimal point in number literal",291 ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",291 ERROR_FLOAT_JUNK_AFTER_EXPONENT => "junk after exponent in number literal",292 ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",292 ERROR_FLOAT_JUNK_AFTER_EXPONENT_SIGN => "junk after exponent sign in number literal",293 STRING_DOUBLE => "string",293 STRING_DOUBLE => "\"string\"",294 ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",294 ERROR_STRING_DOUBLE_UNTERMINATED => "unterminated double-quoted string",295 STRING_SINGLE => "string",295 STRING_SINGLE => "'string'",296 ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",296 ERROR_STRING_SINGLE_UNTERMINATED => "unterminated single-quoted string",297 STRING_DOUBLE_VERBATIM => "string",297 STRING_DOUBLE_VERBATIM => "@\"string\"",298 ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {298 ERROR_STRING_DOUBLE_VERBATIM_UNTERMINATED => {299 "unterminated verbatim double-quoted string"299 "unterminated verbatim double-quoted string"300 }300 }301 STRING_SINGLE_VERBATIM => "string",301 STRING_SINGLE_VERBATIM => "@'string'",302 ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {302 ERROR_STRING_SINGLE_VERBATIM_UNTERMINATED => {303 "unterminated verbatim single-quoted string"303 "unterminated verbatim single-quoted string"304 }304 }305 ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",305 ERROR_STRING_VERBATIM_MISSING_QUOTES => "verbatim string missing opening quotes",306 STRING_BLOCK => "string",306 STRING_BLOCK => "|||string|||",307 ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",307 ERROR_STRING_BLOCK_UNEXPECTED_END => "unexpected end of text block",308 ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",308 ERROR_STRING_BLOCK_MISSING_NEW_LINE => "text block requires new line after |||",309 ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",309 ERROR_STRING_BLOCK_MISSING_TERMINATION => "unterminated text block",310 ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",310 ERROR_STRING_BLOCK_MISSING_INDENT => "text block first line must be indented",311 IDENT => "identifier",311 IDENT => "identifier",312 WHITESPACE => "whitespace",312 WHITESPACE => "whitespace",313 SINGLE_LINE_SLASH_COMMENT => "comment",313 SINGLE_LINE_SLASH_COMMENT => "//comment",314 SINGLE_LINE_HASH_COMMENT => "comment",314 SINGLE_LINE_HASH_COMMENT => "#comment",315 MULTI_LINE_COMMENT => "comment",315 MULTI_LINE_COMMENT => "/*comment*/",316 ERROR_COMMENT_TOO_SHORT => "comment too short",316 ERROR_COMMENT_TOO_SHORT => "comment too short",317 ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",317 ERROR_COMMENT_UNTERMINATED => "unterminated multi-line comment",318 ERROR_NO_OPERATOR => "expected operator",318 ERROR_NO_OPERATOR => "expected operator",xtask/src/sourcegen/kinds.rsdiffbeforeafterboth120 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(),