Class: ImgToScript::Languages::MK90Basic::MK90BasicToken
- Inherits:
-
ImgToScript::LanguageToken
- Object
- ImgToScript::LanguageToken
- ImgToScript::Languages::MK90Basic::MK90BasicToken
- Defined in:
- lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb
Overview
Designed to be used with the MK90 BASIC translator & formatter.
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#keyword ⇒ Object
Returns the value of attribute keyword.
-
#require_nl ⇒ Object
Returns the value of attribute require_nl.
-
#separator ⇒ Object
Returns the value of attribute separator.
-
#sliceable ⇒ Object
Returns the value of attribute sliceable.
Instance Method Summary collapse
-
#initialize(keyword:, args:, separator:, require_nl:, sliceable:) ⇒ MK90BasicToken
constructor
Initialize a new BASIC token.
Constructor Details
#initialize(keyword:, args:, separator:, require_nl:, sliceable:) ⇒ MK90BasicToken
Initialize a new BASIC token.
sliceable = true:
| <- max. characters per line limit
10 DATA 1, [omitted...], 8, 9, 10, 11
=> |
10 DATA 1, [omitted...], 8
20 DATA 9, 10, 11 |
sliceable = false:
|
10 [omitted...]:PRINT"HELLO, WORLD!"
=> |
10 [omitted...] |
20 PRINT"HELLO, WORLD!" |
47 48 49 50 51 52 53 54 55 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 47 def initialize(keyword:, args:, separator:, require_nl:, sliceable:) @keyword = keyword @args = args @separator = separator @require_nl = require_nl @sliceable = sliceable super() end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
10 11 12 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 10 def args @args end |
#keyword ⇒ Object
Returns the value of attribute keyword.
10 11 12 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 10 def keyword @keyword end |
#require_nl ⇒ Object
Returns the value of attribute require_nl.
10 11 12 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 10 def require_nl @require_nl end |
#separator ⇒ Object
Returns the value of attribute separator.
10 11 12 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 10 def separator @separator end |
#sliceable ⇒ Object
Returns the value of attribute sliceable.
10 11 12 |
# File 'lib/img_to_script/languages/mk90_basic/mk90_basic_token.rb', line 10 def sliceable @sliceable end |