parent
417ddb8bac
commit
4c84db1504
|
@ -40,7 +40,8 @@
|
|||
(lambda (total roll)
|
||||
(if (> roll 20)
|
||||
total
|
||||
(adder (+ total (apply roll-dmg roll args)) (+ roll 1)))))
|
||||
(adder (+ total (apply roll-dmg roll args))
|
||||
(+ roll 1)))))
|
||||
(/ (adder 0 1) 20)))
|
||||
|
||||
; find the best power attack score (and expected damage) versus an AC
|
||||
|
|
|
@ -24,13 +24,14 @@ class LispTabber(tab2.StackTabber):
|
|||
if rtoken is not None and rtoken.string != '(':
|
||||
rtoken = self.get_next_right_token(y, i + 1)
|
||||
if rtoken is None:
|
||||
level = self.get_curr_level() + 4
|
||||
level = self.get_curr_level() + self.mode.tabwidth
|
||||
else:
|
||||
level = rtoken.x
|
||||
self._append(token.string, level)
|
||||
return currlvl
|
||||
|
||||
class Lisp(mode2.Fundamental):
|
||||
tabwidth = 2
|
||||
tabbercls = LispTabber
|
||||
grammar = LispGrammar
|
||||
opentokens = ('delimiter',)
|
||||
|
|
|
@ -26,6 +26,7 @@ class SchemeGrammar(Grammar):
|
|||
]
|
||||
|
||||
class Scheme(mode2.Fundamental):
|
||||
tabwidth = 2
|
||||
tabbercls = mode.lisp.LispTabber
|
||||
grammar = SchemeGrammar
|
||||
opentokens = ('delimiter',)
|
||||
|
|
3
tab2.py
3
tab2.py
|
@ -154,7 +154,8 @@ class StackTabber(Tabber):
|
|||
token = self.get_token(y, i)
|
||||
rtoken = self.get_next_right_token(y, i)
|
||||
if rtoken is None:
|
||||
level = self.get_curr_level() + 4
|
||||
#level = self.get_curr_level() + 4
|
||||
level = self.get_curr_level() + self.mode.tabwidth
|
||||
else:
|
||||
level = rtoken.x
|
||||
self._append(token.string, level)
|
||||
|
|
Loading…
Reference in New Issue