Initial commit

This commit is contained in:
2014-10-20 22:18:58 +07:00
commit 81068376fa
18 changed files with 4496 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
case $1 in
foo) echo "FOOOOO!" ;;
bar) echo "BAAAAAR!" ;;
baz) echo "BAAAZZZ!" ;;
*) echo "WHATEVER!"
esac
+8
View File
@@ -0,0 +1,8 @@
for i in 0..3
do
echo "i = $i"
done
if [[ true ]]; then
echo "Truth!"
fi
+26
View File
@@ -0,0 +1,26 @@
package test
import (
"io/ioutil"
"testing"
"github.com/kr/pretty"
"github.com/localhots/penny/lexer"
"github.com/localhots/penny/parser"
)
func TestWorld(t *testing.T) {
b, err := ioutil.ReadFile("example.sh")
if err != nil {
panic(err)
}
lex := lexer.NewLexer(b)
p := parser.NewParser()
st, err := p.Parse(lex)
if err != nil {
panic(err)
}
pretty.Println(st)
}