Skip to content

Commit

Permalink
. some style issues resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
kschiess committed May 25, 2012
1 parent 07423c0 commit 978256c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 12 additions & 5 deletions website/source/get-started.html.textile
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ class MiniP < Parslet::Parser
rule(:operator) { match('[+]') >> space? }

# Grammar parts
rule(:sum) { integer.as(:left) >> operator.as(:op) >> expression.as(:right) }
rule(:sum) {
integer.as(:left) >> operator.as(:op) >> expression.as(:right) }
rule(:arglist) { expression >> (comma >> expression).repeat }
rule(:funcall) { identifier.as(:funcall) >> lparen >> arglist.as(:arglist) >> rparen }
rule(:funcall) {
identifier.as(:funcall) >> lparen >> arglist.as(:arglist) >> rparen }

rule(:expression) { funcall | sum | integer }
root :expression
Expand All @@ -332,9 +334,14 @@ class FunCall < Struct.new(:name, :args);
end

class MiniT < Parslet::Transform
rule(:int => simple(:int)) { IntLit.new(int) }
rule(:left => simple(:left), :right => simple(:right), :op => '+') { Addition.new(left, right) }
rule(:funcall => 'puts', :arglist => subtree(:arglist)) { FunCall.new('puts', arglist) }
rule(:int => simple(:int)) { IntLit.new(int) }
rule(
:left => simple(:left),
:right => simple(:right),
:op => '+') { Addition.new(left, right) }
rule(
:funcall => 'puts',
:arglist => subtree(:arglist)) { FunCall.new('puts', arglist) }
end

parser = MiniP.new
Expand Down
4 changes: 4 additions & 0 deletions website/source/stylesheets/site.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ a

body.code
code
font:
size: 0.9em
family: "Monaco", monospace

// _why's poignant guide theme
.sh_keyword // keyword
color: #761A47
Expand Down

0 comments on commit 978256c

Please sign in to comment.