1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-01 04:19:55 +00:00

Refer to @ as atsign not ampersand.

This commit is contained in:
Calvin Rose 2019-06-01 23:40:59 -04:00
parent e697cc3811
commit c82aac1365

View File

@ -443,7 +443,7 @@ static int longstring(JanetParser *p, JanetParseState *state, uint8_t c) {
static int root(JanetParser *p, JanetParseState *state, uint8_t c); static int root(JanetParser *p, JanetParseState *state, uint8_t c);
static int ampersand(JanetParser *p, JanetParseState *state, uint8_t c) { static int atsign(JanetParser *p, JanetParseState *state, uint8_t c) {
(void) state; (void) state;
p->statecount--; p->statecount--;
switch (c) { switch (c) {
@ -466,7 +466,7 @@ static int ampersand(JanetParser *p, JanetParseState *state, uint8_t c) {
break; break;
} }
pushstate(p, tokenchar, 0); pushstate(p, tokenchar, 0);
push_buf(p, '@'); /* Push the leading ampersand that was dropped */ push_buf(p, '@'); /* Push the leading at-sign that was dropped */
return 0; return 0;
} }
@ -494,7 +494,7 @@ static int root(JanetParser *p, JanetParseState *state, uint8_t c) {
pushstate(p, comment, 0); pushstate(p, comment, 0);
return 1; return 1;
case '@': case '@':
pushstate(p, ampersand, 0); pushstate(p, atsign, 0);
return 1; return 1;
case '`': case '`':
pushstate(p, longstring, PFLAG_LONGSTRING); pushstate(p, longstring, PFLAG_LONGSTRING);