Commit cf626173 authored by Jim Fulton's avatar Jim Fulton

Added comment and raise tags.

parent f582026b
from string import * from string import *
import DT_Doc, DT_Var, DT_In, DT_If, regex import DT_Doc, DT_Var, DT_In, DT_If, regex, DT_Raise
Var=DT_Var.Var Var=DT_Var.Var
from DT_Util import * from DT_Util import *
from DT_Comment import Comment
class String: class String:
__doc__=DT_Doc.String__doc__ __doc__=DT_Doc.String__doc__
...@@ -29,6 +30,8 @@ class String: ...@@ -29,6 +30,8 @@ class String:
'if': DT_If.If, 'if': DT_If.If,
'unless': DT_If.Unless, 'unless': DT_If.Unless,
'else': DT_If.Else, 'else': DT_If.Else,
'comment': Comment,
'raise': DT_Raise.Raise,
} }
def SubTemplate(self, name): return String('', __name__=name) def SubTemplate(self, name): return String('', __name__=name)
...@@ -161,7 +164,9 @@ class String: ...@@ -161,7 +164,9 @@ class String:
sargs=args sargs=args
sstart=start sstart=start
else: else:
try: result.append(scommand(blocks)) try:
if scommand is not Comment:
result.append(scommand(blocks))
except ParseError, m: self.parse_error(m[0],stag,text,l) except ParseError, m: self.parse_error(m[0],stag,text,l)
return start return start
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment