-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Псевдокомментарий *$IDENT как замена ключевого слова $LABEL (#195)
В заявке #195 предлагалось заменить $LABEL на *$PRAGMA-NATIVE-IDENTS, но было выбрано слово $IDENT. Во-первых, вещь второстепенная и с удалением нативных вставок (см. #318) она будет удалена, во-вторых, имеющийся код легко расширить новым ключевым словом, если оно совпадает с точностью до регистра с узлом дерева. А директива $LABEL отображается на узел дерева (Ident t.Pos e.Name).
- Loading branch information
Showing
2 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*$IDENT _-x; | ||
|
||
$ENTRY Go { | ||
%% | ||
(void) arg_begin; | ||
(void) arg_end; | ||
|
||
refalrts::RefalIdentifier mingled = refalrts::ident_implode(vm, "_-x"); | ||
if (mingled != identifiers[ident_u_m_x]) { | ||
return refalrts::cRecognitionImpossible; | ||
} | ||
|
||
return refalrts::cSuccess; | ||
%% | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters