Skip to content

Instantly share code, notes, and snippets.

@Pikuseru
Pikuseru / Test.java
Created December 8, 2016 22:03
Java IIFE and shared scoped variables
interface Function {
Object call(Object argument);
}
interface A {
void set(String object);
String get();
}
interface B {
@Pikuseru
Pikuseru / objc-header-grammar.txt
Created November 6, 2016 16:12
Objective-C PEG grammar (first attempt)
interface = "@interface" _ identifier _ (":" _ identifier)? _ protocols? _ (property / selector)* _ "@end" _ eof
protocols = "<" _ identifier (_ "," _ identifier)* _ ">"
property = "@property" _ attributes? _ type _ pointer? _ identifier _ ";" _
attributes = "(" _ attribute (_ "," _ attribute)* _ ")"
attribute = getter / identifier
getter = identifier _ "=" _ identifier
selector = ("+" / "-") _ typereference _ (selectorpart+ / identifier) _ ";" _
selectorpart = identifier _ ":" _ typereference _ identifier _
typereference = "(" _ type _ pointer? _ ")"
type = list / dict / set / identifier
@Pikuseru
Pikuseru / bunkum.html
Created October 23, 2016 13:21
Decorators
<!DOCTYPE html>
<html lang="en">
<head>
<title>bunkum</title>
<script src="bunkum.js"></script>
</head>
<body>
</body>
</html>