mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
CHAR word
This commit is contained in:
parent
41d56cdefa
commit
b54ba1fdaf
@ -111,7 +111,8 @@ predef _immediate_#0, _exit_#0, _pad_#1, _trailing_(a,b)#2
|
||||
predef _tors_(a)#0, _fromrs_#1, _toprs_#1, _execute_(a)#0, _lookup_#1
|
||||
predef _move_(a,b,c)#0, _fill_(a,b,c)#0, _plasma_(a)#0
|
||||
predef _var_(a)#0, _const_(a)#0, _lit_#1, _slit_#1, _find_(a)#2, _tick_#1
|
||||
predef _forget_#0, _terminal_#1, _prat_(a)#0, _prhexat_(a)#0, _str_#0, _prstr_#0, _prpstr_#0
|
||||
predef _forget_#0, _terminal_#1, _prat_(a)#0, _prhexat_(a)#0
|
||||
predef _char_#0, _str_#0, _prstr_#0, _prpstr_#0
|
||||
predef _prval_(a)#0, _prbyte_(a)#0, _prshex_(a)#0, _prsbyte_(a)#0, _prhex_(a)#0
|
||||
predef _accept_(a,b)#1, _src_(a)#0, _srcstr_#0, _query_#0, _expect_(a,b)#0, _type_(a,b)#0
|
||||
predef _vlist_#0, _tron_#0, _troff_#0, _stepon_#0, _stepoff_#0
|
||||
@ -580,10 +581,14 @@ word = @d_space, 0, @_spaces_
|
||||
char d_type = "TYPE"
|
||||
byte = 0
|
||||
word = @d_spaces, 0, @_type_
|
||||
// CHAR
|
||||
char d_char = "CHAR"
|
||||
byte = imm_flag
|
||||
word = @d_type, 0, @_char_
|
||||
// STRING
|
||||
char d_str = "\""
|
||||
byte = imm_flag
|
||||
word = @d_type, 0, @_str_
|
||||
word = @d_char, 0, @_str_
|
||||
// LITERAL STRING ( not in vocabulary )
|
||||
char d_slit = "SLIT"
|
||||
byte = param_flag | inline_flag
|
||||
@ -1670,6 +1675,17 @@ end
|
||||
def _prhexat_(a)#0
|
||||
putc('$'); puth(*a); putc(' ')
|
||||
end
|
||||
def _char_#0
|
||||
word str
|
||||
byte len
|
||||
|
||||
str, len = nextword(' ')
|
||||
if state & comp_flag
|
||||
compliteral(^str)
|
||||
else
|
||||
(@push)(^str)#0
|
||||
fin
|
||||
end
|
||||
def _str_#0
|
||||
word str
|
||||
byte len
|
||||
|
Loading…
x
Reference in New Issue
Block a user