basic stuff + partial transpile
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
mod checking {
|
||||
pub fn isalpha(str: &str) -> bool {
|
||||
str.to_uppercase() != str.to_lowercase()
|
||||
}
|
||||
|
||||
pub fn isint(str: &str) -> bool {
|
||||
let c = str.chars().next().unwrap_or('\0');
|
||||
let bounds = ('0', '9');
|
||||
|
||||
c >= bounds.0 && c <= bounds.1
|
||||
}
|
||||
|
||||
pub fn isskippable(str: &str) -> bool {
|
||||
match str {
|
||||
" " | "\n" | "\t" => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
mod ast;
|
||||
mod lexer;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
Reference in New Issue
Block a user