struct Novika::QuotedWord
- Novika::QuotedWord
- Struct
- Value
- Object
Overview
Quoted words are words prefixed by '#': e.g., #foo
. It
lets you 'coat' a word: #foo open
is the same as foo
,
##foo open
is the same as #foo
, etc. Levels of coating
are peeled off like in an onion.
Included Modules
Defined in:
novika/forms/words.crConstructors
Class Method Summary
Instance Method Summary
- #==(other : self)
-
#desc(io : IO)
Appends a string description of this form to io.
-
#hash(hasher)
See
Object#hash(hasher)
-
#id : String
Returns the underlying string id.
- #on_parent_open(engine) : self
-
#peel
"Peels" off a layer of quoting.
-
#to_quoted_word
Adds another layer of quoting.
- #to_s(io)
-
#to_word : Word
Converts this quoted word to
Word
.
Instance methods inherited from module Novika::Schedulable::ShouldOpenWhenScheduled
schedule!(engine : Engine, stack : Block)
schedule!
Instance methods inherited from module Novika::Form
a(type : T.class) : T forall T
a,
desc(io : IO)desc : String desc, die(details : String) die, effect(io)
effect effect, on_open(engine : Engine) : self on_open, on_parent_open(engine : Engine) : self on_parent_open, onto(block : Block) : self onto, sel(a, b) sel, to_quote : Quote to_quote
Instance methods inherited from module Novika::Schedulable
schedule(engine : Engine, stack : Block)
schedule,
schedule!(engine : Engine, stack : Block)
schedule!
Constructor Detail
Class Method Detail
Instance Method Detail
def desc(io : IO)
#
Description copied from module Novika::Form
Appends a string description of this form to io.
def peel
#
"Peels" off a layer of quoting.
QuotedWord.new("#foo").peel # Word.new("foo")
QuotedWord.new("##foo").peel # QuotedWord.new("#foo")
QuotedWord.new("###foo").peel # QuotedWord.new("##foo")