mirror of
https://github.com/ganelson/inform.git
synced 2024-06-30 22:14:58 +03:00
Merge pull request #48 from neroden/parser-hook-for-compliant-characters
Parser hook for compliant characters
This commit is contained in:
commit
d3cb3912db
|
@ -1283,6 +1283,9 @@ communicates a snippet of words to another character, just as if the
|
|||
player had typed ANSWER ARFLE BARFLE GLOOP TO PERSON. For I7 purposes, the
|
||||
fake action |##NotUnderstood| does not exist.
|
||||
|
||||
In order to assist people who do want to parse that type of mistyped command
|
||||
in extensions, wn is left pointing at the first word not parsed as a command.
|
||||
|
||||
=
|
||||
.GiveError;
|
||||
|
||||
|
@ -1292,6 +1295,7 @@ fake action |##NotUnderstood| does not exist.
|
|||
verb_wordnum = usual_grammar_after;
|
||||
jump AlmostReParse;
|
||||
}
|
||||
m = wn; ! Save wn so extension authors can parse command errors if they want to
|
||||
wn = 1;
|
||||
while ((wn <= num_words) && (NextWord() ~= comma_word)) ;
|
||||
parser_results-->ACTION_PRES = ##Answer;
|
||||
|
@ -1300,6 +1304,7 @@ fake action |##NotUnderstood| does not exist.
|
|||
parser_results-->INP2_PRES = 1; special_number1 = special_word;
|
||||
actor = player;
|
||||
consult_from = wn; consult_words = num_words-consult_from+1;
|
||||
wn = m; ! Restore wn so extension authors can parse command errors if they want to
|
||||
rtrue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue