1
Fork 0

Implement macro meta-variable expressions

This commit is contained in:
Caio 2022-03-09 16:46:23 -03:00
parent 10dccdc7fc
commit 8073a88f35
17 changed files with 900 additions and 44 deletions

View file

@ -23,7 +23,7 @@ pub enum LitError {
impl LitKind {
/// Converts literal token into a semantic literal.
fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
pub fn from_lit_token(lit: token::Lit) -> Result<LitKind, LitError> {
let token::Lit { kind, symbol, suffix } = lit;
if suffix.is_some() && !kind.may_have_suffix() {
return Err(LitError::InvalidSuffix);