mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
StringLiteral -> StringLit
This commit is contained in:
parent
f0525792a9
commit
f36d9b960f
@ -690,7 +690,7 @@ impl ParserContext {
|
||||
Token::False => Expression::Value(ValueExpression::Boolean("false".into(), span)),
|
||||
Token::AddressLit(value) => Expression::Value(ValueExpression::Address(value, span)),
|
||||
Token::CharLit(value) => Expression::Value(ValueExpression::Char(value, span)),
|
||||
Token::StringLiteral(value) => Expression::Value(ValueExpression::String(value, span)),
|
||||
Token::StringLit(value) => Expression::Value(ValueExpression::String(value, span)),
|
||||
Token::LeftParen => self.parse_tuple_expression(&span)?,
|
||||
Token::LeftSquare => self.parse_array_expression(&span)?,
|
||||
Token::Ident(name) => {
|
||||
|
@ -228,7 +228,7 @@ impl ParserContext {
|
||||
let start_span;
|
||||
let string = match self.expect_any()? {
|
||||
SpannedToken {
|
||||
token: Token::StringLiteral(chars),
|
||||
token: Token::StringLit(chars),
|
||||
span,
|
||||
} => {
|
||||
start_span = span;
|
||||
|
@ -248,7 +248,7 @@ impl Token {
|
||||
return (0, None);
|
||||
}
|
||||
|
||||
return (i + 1, Some(Token::StringLiteral(string)));
|
||||
return (i + 1, Some(Token::StringLit(string)));
|
||||
}
|
||||
b'\'' => {
|
||||
let mut i = 1;
|
||||
|
@ -25,7 +25,7 @@ pub enum Token {
|
||||
// Literals
|
||||
CommentLine(#[serde(with = "leo_ast::common::tendril_json")] StrTendril),
|
||||
CommentBlock(#[serde(with = "leo_ast::common::tendril_json")] StrTendril),
|
||||
StringLiteral(Vec<char>),
|
||||
StringLit(Vec<char>),
|
||||
Ident(#[serde(with = "leo_ast::common::tendril_json")] StrTendril),
|
||||
Int(#[serde(with = "leo_ast::common::tendril_json")] StrTendril),
|
||||
True,
|
||||
@ -191,7 +191,7 @@ impl fmt::Display for Token {
|
||||
match self {
|
||||
CommentLine(s) => write!(f, "{}", s),
|
||||
CommentBlock(s) => write!(f, "{}", s),
|
||||
StringLiteral(content) => {
|
||||
StringLit(content) => {
|
||||
write!(f, "\"")?;
|
||||
for character in content {
|
||||
write!(f, "{}", character)?;
|
||||
|
Loading…
Reference in New Issue
Block a user