From 3075429adc93c18c72a77a311056debe89342aca Mon Sep 17 00:00:00 2001 From: Radoslav Georgiev Date: Sun, 21 Oct 2018 13:37:26 +0300 Subject: 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 --- homework/81030/example.rs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 homework/81030/example.rs (limited to 'homework/81030/example.rs') 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 -- cgit v1.3.1-26-gb76a