Skip to content

Instantly share code, notes, and snippets.

// Any other scan code
case =>
chr := (shift ? uppercase : lowercase)[scancode] as Char
Bochs debug("Char: %c" format(chr))
chr print()
((bol 1 . 1)
(IF_KW 1 . 3)
(symbol 4 . 5)
(newline 5 . 6))
%package ooc-wisent-wy
%languagemode ooc-mode
%start statements
;; keywords
%keyword BREAK_KW "break"
%keyword CONTINUE_KW "continue"
%keyword RETURN_KW "return"
CONTINUE_KW "continue"
%keyword RETURN_KW "return"
%keyword FUNC_KW "func"
%keyword CLASS_KW "class"
%keyword COVER_KW "cover"
%keyword ENUM_KW "enum"
%keyword INTERFACE_KW "interface"
%keyword FROM_KW "from"
%keyword ABSTRACT_KW "abstract"
((symbol 1 . 7)
(symbol 8 . 15)
(punctuation 15 . 16)
(symbol 16 . 25)
(symbol 26 . 32)
(symbol 33 . 41)
(punctuation 41 . 42)
(symbol 42 . 53)
(symbol 55 . 59)
(punctuation 59 . 60)
lrwxrwxrwx 1 james 1002 27 Jul 12 00:04 .#test.ooc -> james@lappy.3842:1278539029
-rw-r--r-- 1 james 1002 57 Jul 12 00:04 test.ooc
.-(~/e/ooc-mode)-----------------------------------------------------------------------------------------(james@lappy)-
`--> ~/repos/rock/bin/rock -onlycheck test.ooc
[1] 18940 segmentation fault ~/repos/rock/bin/rock -onlycheck test.ooc
.-(~/e/ooc-mode)-----------------------------------------------------------------------------------------(james@lappy)-
`--> rm .\#test.ooc
.-(~/e/ooc-mode)-----------------------------------------------------------------------------------------(james@lappy)-
`--> ~/repos/rock/bin/rock -onlycheck test.ooc
./test.ooc:5:7 [ERROR] No such function doThis()
if(condition)
doThis()
else
doThat()
import unittest
import q
class TestQueue(unittest.TestCase):
def test_get_length(self):
q = queue.queue_class()
self.assertEqual(0, q.get_length())
q.raw('stuff')
self.assertEqual(1, q.get_length())
.raw('stuff')
self.assertEqual(1, q.get_length())
if __name__ == '__main__':
unittest.main()
import unittest
import q
class TestQueue(unittest.TestCase):
def test_get_length(self):
q = queue.queue_class()
self.assertEqual(0, q.get_length())
obj.raw('stuff')
self.assertEqual(1, q.get_length())