nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples: annotate examples
[nit.git]
/
lib
/
template
/
macro.nit
diff --git
a/lib/template/macro.nit
b/lib/template/macro.nit
index
1f53cdf
..
615c45f
100644
(file)
--- a/
lib/template/macro.nit
+++ b/
lib/template/macro.nit
@@
-37,7
+37,7
@@
import template
# A macro identifier is valid if:
#
# * starts with an uppercase letter
# A macro identifier is valid if:
#
# * starts with an uppercase letter
-# * contains only numers, uppercase letters or '_'
+# * contains only numbers, uppercase letters or '_'
#
# See `String::is_valid_macro_name` for more details.
#
#
# See `String::is_valid_macro_name` for more details.
#
@@
-105,7
+105,7
@@
class TemplateString
super Template
# Template original text.
super Template
# Template original text.
- private var tpl_text: String
+ var tpl_text: String
# Macros contained in the template file.
private var macros = new HashMap[String, Array[TemplateMacro]]
# Macros contained in the template file.
private var macros = new HashMap[String, Array[TemplateMacro]]
@@
-127,8
+127,7
@@
class TemplateString
#
# var tpl = new TemplateString("Hello %NAME%!")
# assert tpl.write_to_string == "Hello %NAME%!"
#
# var tpl = new TemplateString("Hello %NAME%!")
# assert tpl.write_to_string == "Hello %NAME%!"
- init(text: String) do
- self.tpl_text = text
+ init do
parse
end
parse
end