diff options
| Commit | 3075429adc93c18c72a77a311056debe89342aca (patch) | |
|---|---|---|
| Author | 2018-10-21 13:37:26 +0300 | |
| Committer | 2018-10-21 13:37:26 +0300 | |
| Files | 1c4bd705209218f11f785bdb33c74b06bb449ef5 /homework/81030/example.rs | |
| IPL-3075429adc93c18c72a77a311056debe89342aca.tar IPL-3075429adc93c18c72a77a311056debe89342aca.tar.gz IPL-3075429adc93c18c72a77a311056debe89342aca.zip | ||
| Parent | 4366cb1f8e2c8c57b108e5b3f07ab451c1a7112d (diff) | |
implement the first homework assignment (#8)
* Rust syntax highlighter: add incomplete implementation of a scanner for the Rust programming language
* Rust syntax highlighter: fix some issues with unrecognized rules caused by unescaped literals
* Rust syntax highlighter: refactor the definitions section, fixing some escaping-related style issues
* Rust syntax highlighter: refactor the definitions and rules sections, abstracting out some hardcoded patterns
* Rust syntax highlighter: refactor, reordering the definitions, rules and CSS class definitions
* Rust syntax highlighter: refactor, fixing some style issues with the C code
* Rust syntax highlighter: refactor the code section, fixing some HTML- and CSS-related issues
* Rust syntax highlighter: drop the document title from the output as it is wrongly hardcoded
* Rust syntax highlighter: add gitignore
* Rust syntax highlighter: add C source of generated scanner
* Rust syntax highlighter: add example Rust program
1 files changed, 7 insertions, 0 deletions
| -rw-r--r-- | homework/81030/example.rs | 7 |
diff --git a/homework/81030/example.rs b/homework/81030/example.rs new file mode 100644 index 0000000..e76448d --- /dev/null +++ b/homework/81030/example.rs @@ -0,0 +1,7 @@ +fn answer() -> usize { + return 42; +} + +fn main() { + println!("The \"Answer\" is: '{}'", answer()); +}
\ No newline at end of file |
