Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Inform6Lexer to Inform 6.36 #2050

Merged
merged 1 commit into from Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions pygments/lexers/int_fiction.py
Expand Up @@ -381,10 +381,10 @@ class Inform6Lexer(RegexLexer):
include('_whitespace'),
(words((
'additive', 'alias', 'buffer', 'class', 'creature', 'data', 'error', 'fatalerror',
'first', 'has', 'held', 'initial', 'initstr', 'last', 'long', 'meta', 'multi',
'multiexcept', 'multiheld', 'multiinside', 'noun', 'number', 'only', 'private',
'replace', 'reverse', 'scope', 'score', 'special', 'string', 'table', 'terminating',
'time', 'topic', 'warning', 'with'), suffix=r'\b'),
'first', 'has', 'held', 'individual', 'initial', 'initstr', 'last', 'long', 'meta',
'multi', 'multiexcept', 'multiheld', 'multiinside', 'noun', 'number', 'only',
'private', 'replace', 'reverse', 'scope', 'score', 'special', 'string', 'table',
'terminating', 'time', 'topic', 'warning', 'with'), suffix=r'\b'),
Keyword, '#pop'),
(r'static\b', Keyword),
(r'[%s]{1,2}>|[+=]' % _dash, Punctuation, '#pop')
Expand All @@ -399,7 +399,8 @@ class Inform6Lexer(RegexLexer):
],
'property-keyword*': [
include('_whitespace'),
(r'(additive|long)\b', Keyword),
(words(('additive', 'individual', 'long'), suffix=r'\b(?!(\s*|(![^%s]*))*;)' % _newline),
Keyword),
default('#pop')
],
'trace-keyword?': [
Expand Down
18 changes: 15 additions & 3 deletions tests/examplefiles/inform6/inform6_example
Expand Up @@ -8,8 +8,8 @@ Switches d2SDq;
Constant Story "Informal Testing";
Constant Headline "^Not a game.^";!% This is a comment, not ICL.

Release 4;
Serial "200526";
Release 5;
Serial "220125";
Version 5;

Ifndef TARGET_ZCODE;
Expand Down Expand Up @@ -68,7 +68,19 @@ Origsource "^~@{.inf" 67;
Origsource "^~@{.inf" 68 1;
Origsource;

Property long additive additive long alias;
Property long
! A long way from the property name
! to the semicolon
;
Property additive;
Property individual;
Iffalse true;
Property long individual;
Property long individual individual;
Property additive individual;
Property individual individual;
Endif;
Property long additive long additive long alias;
Property long long long wingspan alias alias;

Class Flier with wingspan 5;
Expand Down
83 changes: 81 additions & 2 deletions tests/examplefiles/inform6/inform6_example.output

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.