-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse floats, unescape strings and chars
- Loading branch information
Showing
10 changed files
with
130 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
mod Simple { | ||
fn main() -> i64 { | ||
let a: char = hello_chars('\t'); | ||
return 1; | ||
} | ||
|
||
fn hello_chars(a: char) -> char { | ||
let x: char = 'b'; | ||
let newline: char = '\n'; | ||
|
||
return x + newline + a; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
mod Simple { | ||
fn main() -> i64 { | ||
let a: f32 = my_f32(2.0, 4.0); | ||
let b: f64 = my_f64(2.0, 4.0); | ||
return 1; | ||
} | ||
|
||
fn my_f32(x: f32, y: f32) -> f32 { | ||
let literal: f32 = 2.0; | ||
let literal2: f32 = 2.; | ||
let literal3: f32 = .1; | ||
return x + y + literal2 + literal3; | ||
} | ||
|
||
fn my_f64(x: f64, y: f64) -> f64 { | ||
let literal: f64 = 2.0; | ||
let literal2: f64 = 2.; | ||
let literal3: f64 = .1; | ||
return x + y + literal2 + literal3; | ||
} | ||
} |