Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
farmaazon committed Mar 5, 2025
1 parent ad03676 commit 5f90d2e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions app/rust-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@ pub fn is_ident_or_operator(code: &str) -> u32 {
}
}

#[wasm_bindgen]
pub fn is_ident_or_operator(code: &str) -> u32 {
let parsed = enso_parser::lexer::run(code);
if parsed.internal_error.is_some() {
return 0;
}
let token = match &parsed.value[..] {
[token] => token,
_ => return 0,
};
match &token.variant {
enso_parser::syntax::token::Variant::Ident(_) => 1,
enso_parser::syntax::token::Variant::Operator(_) => 2,
_ => 0,
}
}

#[wasm_bindgen]
pub fn is_numeric_literal(code: &str) -> bool {
let parsed = PARSER.with(|parser| parser.parse_block(code));
Expand Down

0 comments on commit 5f90d2e

Please sign in to comment.