Skip to content

Instantly share code, notes, and snippets.

http://gist.github.com/#
#--------------------------------
# A simple language, one step above Scratch.
#--------------------------------
tom = Sprite "cat.png"
when start
move tom 10
end
diff --git a/src/rt/rust_port_selector.cpp b/src/rt/rust_port_selector.cpp
index d958eac..e1d627e 100644
--- a/src/rt/rust_port_selector.cpp
+++ b/src/rt/rust_port_selector.cpp
@@ -1,8 +1,10 @@
#include "rust_port.h"
#include "rust_port_selector.h"
+#include "rust_util.h"
-rust_port_selector::rust_port_selector()
diff --git a/src/rt/rust_port_selector.cpp b/src/rt/rust_port_selector.cpp
index d958eac..e1d627e 100644
--- a/src/rt/rust_port_selector.cpp
+++ b/src/rt/rust_port_selector.cpp
@@ -1,8 +1,10 @@
#include "rust_port.h"
#include "rust_port_selector.h"
+#include "rust_util.h"
-rust_port_selector::rust_port_selector()
let input = result::get(io::read_whole_file_str(filename));
let start = str::find_str(input, "{{");
let end = str::find_str(input, "}}");
if option::is_none(start) || option::is_none(end) {
error("invalid rom file");
ret;
}
fn main(args: [str]) {
let thing = "{{ f }}";
let f = str::find_str(thing, "{{");
if f.is_none() {
io::println("None!");
}
}
/*
@jamorton
jamorton / gist:2323598
Created April 6, 2012 22:35
Pygments Test File
/** Comment
Thing / * * /
*/ /* */
// /* test
// TEST
// \\ / Comment \/ // */
@jamorton
jamorton / gist:2323601
Created April 6, 2012 22:37
Rust Lexer for pygments
class RustLexer(RegexLexer):
"""
Lexer for Mozilla's Rust programming language
"""
name = 'Rust'
filenames = ['*.rs', '*.rc']
aliases = ['rust']
mimetypes = ['text/x-rustsrc']
for instrs.each {|i|
bytes += instruction_bytes(i)
};
for instrs.each {|i|
bytes += instruction_bytes(i);
};
ncalls tottime percall cumtime percall filename:lineno(function)
16 0.000 0.000 0.000 0.000 <string>:8(__new__)
1 0.000 0.000 0.000 0.000 Cookie.py:573(__init__)
7 0.000 0.000 0.000 0.000 __init__.py:108(get_auth_header)
10 0.000 0.000 0.777 0.078 __init__.py:1110(debug)
3 0.000 0.000 0.688 0.229 __init__.py:1122(info)
251 0.000 0.000 0.000 0.000 __init__.py:1164(get_internal_type)
42 0.000 0.000 0.000 0.000 __init__.py:118(<genexpr>)
7 0.000 0.000 0.000 0.000 __init__.py:1197(findCaller)
7 0.000 0.000 0.000 0.000 __init__.py:1218(makeRecord)