introduced the notation for a smptr literal - #\pXX.
changed the error listeral notation to #\eNN fro #\NN
This commit is contained in:
@ -8,19 +8,19 @@ class(#limited) Error(Apex)
|
||||
|
||||
pooldic Error.Code
|
||||
{
|
||||
ENOERR := #\0.
|
||||
EGENERIC := #\1.
|
||||
ENOIMPL := #\2.
|
||||
ESYSERR := #\3.
|
||||
EINTERN := #\4.
|
||||
ESYSMEM := #\5.
|
||||
EOOMEM := #\6.
|
||||
EINVAL := #\7.
|
||||
ENOENT := #\8.
|
||||
EPERM := #\12.
|
||||
ERANGE := #\20.
|
||||
ENOERR := #\E0.
|
||||
EGENERIC := #\E1.
|
||||
ENOIMPL := #\E2.
|
||||
ESYSERR := #\E3.
|
||||
EINTERN := #\E4.
|
||||
ESYSMEM := #\E5.
|
||||
EOOMEM := #\E6.
|
||||
EINVAL := #\E7.
|
||||
ENOENT := #\E8.
|
||||
EPERM := #\E12.
|
||||
ERANGE := #\E20.
|
||||
|
||||
ELIMIT := #\9999.
|
||||
ELIMIT := #\E9999.
|
||||
(* add more items... *)
|
||||
}
|
||||
|
||||
@ -302,8 +302,8 @@ extend Error
|
||||
|
||||
pooldic/const
|
||||
{
|
||||
NONE := #\0.
|
||||
GENERIC := #\1.
|
||||
NONE := #\e0.
|
||||
GENERIC := #\e1.
|
||||
}
|
||||
-------------------------------- *)
|
||||
|
||||
|
@ -52,6 +52,7 @@ class MyObject(Object)
|
||||
'string not closed'
|
||||
'no character after $'
|
||||
'no valid character after #'
|
||||
'no valid character after #\'
|
||||
'wrong character literal'
|
||||
'colon expected'
|
||||
'string expected'
|
||||
@ -59,6 +60,7 @@ class MyObject(Object)
|
||||
'invalid numeric literal'
|
||||
'byte too small or too large'
|
||||
'wrong error literal'
|
||||
'wrong smptr literal'
|
||||
'{ expected'
|
||||
'} expected'
|
||||
'( expected'
|
||||
@ -154,13 +156,22 @@ class MyObject(Object)
|
||||
|
||||
method(#class) printString: s prefix: prefix index: index on: f
|
||||
{
|
||||
| c |
|
||||
| c |
|
||||
c := s size - 1.
|
||||
|
||||
f puts('static moo_ooch_t ', prefix, index asString, '[] = {').
|
||||
|
||||
0 to: c do: [:i |
|
||||
f putc($', (s at: i), $').
|
||||
| ch |
|
||||
ch := s at: i.
|
||||
if (ch == $\ or: [ch == $"])
|
||||
{
|
||||
f putc($', $\, (s at: i), $').
|
||||
}
|
||||
else
|
||||
{
|
||||
f putc($', (s at: i), $').
|
||||
}.
|
||||
(i = c) ifFalse: [f putc($,) ].
|
||||
].
|
||||
|
||||
|
Reference in New Issue
Block a user