-
Notifications
You must be signed in to change notification settings - Fork 593
[C Family] Full rewrite of C family syntaxes #4147
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
Draft
camila314
wants to merge
66
commits into
sublimehq:master
Choose a base branch
from
camila314:c-rewrite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 3 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
d46975e
Initial Commit for rewrite
camila314 8546556
syntax test file wip
camila314 c7b239a
\9 shouldn't be a valid escape
camila314 ab7b691
Fix some issues pointed out
camila314 0748783
- Add _Static_assert, static_assert, _Pragma word operators
camila314 e09a040
Fix line escape in string
camila314 85a129e
Update Syntax Test
camila314 0f0ac07
Add typedef entity (with fn pointer) and make function params highlig…
camila314 3e2d92a
Remove consume-pop
camila314 f1abee3
Add std funcs
camila314 5497d83
Syntax Test
camila314 a8887ab
Add actual tests to the syntax test file
camila314 a60ca70
Fix name in syntax test
camila314 332929e
Reformat file to be top-down instead of bottom-up
camila314 9dcc40d
fix scopes in test file (oops)
camila314 8e6534c
Start ObjC
camila314 38438e0
Fix declspec being silly
camila314 568b426
huge mistake
camila314 c69b396
Add fallback for messed up parenthesis
camila314 23f087c
Macros should only have parameters if there's no space between the na…
camila314 f703731
Add some more objc storage types
camila314 d4a595a
Add self access to ObjC, remove look-behinds from both syntaxes
camila314 f00c315
Don't include prototype for single and angle strings
camila314 be03dd4
Update Syntax Tests
camila314 a1e1478
Add many to ObjC
camila314 d7ba999
Minor fixes
camila314 acf156b
Avoid treating `return` and other control keywords as function return…
camila314 b5b5bcd
Function calls can span a newline (#2815)
camila314 5315b9d
Update tests for previous commit
camila314 5b4e0aa
Improve multi-line function call
camila314 048a17d
Fix major multiline bug, move directive beginning into variable
camila314 7d0a6a4
Modify ObjC tests to match correct scope
camila314 c3d4f29
common bug fixes
camila314 1f59590
Start working on C++
camila314 0dd2e30
Fix C stuff, update syntax tests
camila314 57432b4
Update C++
camila314 e6e6039
Add template, default parameters, change scope to c++ instead of cpp
camila314 15a2619
Add template <> to keymap
camila314 74e39c4
Update C and syntax tests
camila314 fbf17e5
Remove accessor test files (already managed in main test file)
camila314 51c67ae
Fix #2334
camila314 ca0dd19
add operator functions, remove some jank
camila314 24a79e0
Module and lambda
camila314 059faad
Fix objc issues
camila314 ffb8b92
Don't consume ; in typedef fallback
camila314 4e03364
Add member access highlight
camila314 1187cc3
Fixes
camila314 523e230
Objective-C++ and bug fixes
camila314 a540d2e
Fix #1438 and simplify function pointer / block
camila314 da8ed97
Fix meta issue with enclosures, lots of cleanup
camila314 a6a98c3
Add concepts and enum class
camila314 2ade85e
Adhere closer to stylistic convention
camila314 c415e21
Change extends
camila314 fdcb4dd
Add standard attributes
camila314 c8d276d
Remove c++ sublime settings
camila314 8336715
C++ Syntax Test
camila314 84c04bc
Objective-C++ syntax tests
camila314 1055d64
Small accessor fixes
camila314 89f92e9
Case and arrow pointer fix
camila314 29a3f2b
Minor Fixes
camila314 6b14a5f
Minor Fixes
camila314 57cdf66
More fixes
camila314 dcbfd87
Forgot to commit this file
camila314 ef1450c
Typo fix
camila314 6b2206e
Fix struct, union, enum and more
camila314 db4b3b7
Apply suggestions from code review
camila314 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -35,6 +35,8 @@ contexts: | |||||||||
scope: constant.other.placeholder.c | ||||||||||
string.double: | ||||||||||
- meta_scope: string.quoted.double.c | ||||||||||
- meta_include_prototype: false | ||||||||||
- include: preprocessor.line-escape | ||||||||||
- match: \" | ||||||||||
scope: punctuation.definition.string.end.c | ||||||||||
pop: 1 | ||||||||||
|
@@ -46,6 +48,11 @@ contexts: | |||||||||
scope: punctuation.definition.string.end.c | ||||||||||
pop: 1 | ||||||||||
- include: string.escape | ||||||||||
string.angled: | ||||||||||
- meta_scope: string.quoted.other.c | ||||||||||
- match: \> | ||||||||||
scope: punctuation.definition.string.end.c | ||||||||||
pop: 1 | ||||||||||
string: | ||||||||||
- match: (L|u8?|U)?(\") | ||||||||||
captures: | ||||||||||
|
@@ -75,7 +82,7 @@ contexts: | |||||||||
- match: ==|!=|<=|>=|<|> | ||||||||||
scope: keyword.operator.comparison.c | ||||||||||
operator.word: | ||||||||||
- match: \b(?:sizeof|_Alignof|alignof|offsetof)\b | ||||||||||
- match: \b(?:sizeof|_Alignof|alignof|offsetof|_Static_assert|static_assert|_Pragma)\b | ||||||||||
scope: keyword.operator.word.c | ||||||||||
operator.ternary: | ||||||||||
- match: '\?|\:' | ||||||||||
|
@@ -118,7 +125,7 @@ contexts: | |||||||||
# decimal floats | ||||||||||
- match: |- | ||||||||||
(?x: | ||||||||||
\b(\d+) | ||||||||||
\b(\d(?:\d|'(?=[^']))*) | ||||||||||
(?: | ||||||||||
( (\.) | ||||||||||
(?: | ||||||||||
|
@@ -160,46 +167,46 @@ contexts: | |||||||||
4: constant.numeric.suffix.c | ||||||||||
5: invalid.illegal.numeric.suffix.c | ||||||||||
# binary integer (C23) | ||||||||||
- match: \b(0[bB])([0-1]*)(?:({{integer_suffix}})|({{bin_suffix}}))? | ||||||||||
- match: \b(0[bB])([01](?:[01]|'(?=[^']))*)?(?:({{integer_suffix}})|({{bin_suffix}}))? | ||||||||||
scope: meta.number.integer.binary.c | ||||||||||
captures: | ||||||||||
1: constant.numeric.base.c | ||||||||||
2: constant.numeric.value.c | ||||||||||
3: constant.numeric.suffix.c | ||||||||||
4: invalid.illegal.numeric.suffix.c | ||||||||||
# hexadecimal integer | ||||||||||
- match: \b(0[xX])(\h*)(?:({{integer_suffix}})|({{hex_suffix}}))? | ||||||||||
- match: \b(0[xX])(\h(?:\h|'(?=[^']))*)?(?:({{integer_suffix}})|({{hex_suffix}}))? | ||||||||||
scope: meta.number.integer.hexadecimal.c | ||||||||||
captures: | ||||||||||
1: constant.numeric.base.c | ||||||||||
2: constant.numeric.value.c | ||||||||||
3: constant.numeric.suffix.c | ||||||||||
4: invalid.illegal.numeric.suffix.c | ||||||||||
# octal integer | ||||||||||
- match: \b(0)([0-7]+)(?:({{integer_suffix}})|({{oct_suffix}}))? | ||||||||||
- match: \b(0)([0-7](?:[0-7]|'(?=[^']))*)(?:({{integer_suffix}})|({{oct_suffix}}))? | ||||||||||
scope: meta.number.integer.octal.c | ||||||||||
captures: | ||||||||||
1: constant.numeric.base.c | ||||||||||
2: constant.numeric.value.c | ||||||||||
3: constant.numeric.suffix.c | ||||||||||
4: invalid.illegal.numeric.suffix.c | ||||||||||
# decimal integer | ||||||||||
- match: \b(\d+)(?:({{integer_suffix}})|({{dec_suffix}}))? | ||||||||||
- match: \b(\d(?:\d|'(?=[^']))*)(?:({{integer_suffix}})|({{dec_suffix}}))? | ||||||||||
scope: meta.number.integer.decimal.c | ||||||||||
captures: | ||||||||||
1: constant.numeric.value.c | ||||||||||
2: constant.numeric.suffix.c | ||||||||||
3: invalid.illegal.numeric.suffix.c | ||||||||||
|
||||||||||
constant.malformed: | ||||||||||
- match: \b(?i:true|false|null|__func__|__cplusplus)\b | ||||||||||
- match: \b(?i:true|false|null|nullptr|__cplusplus)\b | ||||||||||
scope: invalid.illegal.malformed-constant-language.c | ||||||||||
constant: | ||||||||||
- match: \b(true|TRUE)\b | ||||||||||
camila314 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
scope: constant.language.boolean.true.c | ||||||||||
- match: \b(false|FALSE)\b | ||||||||||
scope: constant.language.boolean.false.c | ||||||||||
- match: \bNULL\b | ||||||||||
- match: \b(NULL|nullptr)\b | ||||||||||
scope: constant.language.null.c | ||||||||||
- match: \b__func__\b | ||||||||||
scope: constant.language.c | ||||||||||
|
@@ -213,7 +220,7 @@ contexts: | |||||||||
- meta_scope: meta.group.c | ||||||||||
- match: \b{{declspec_item}}\b | ||||||||||
scope: constant.other.c | ||||||||||
- match: \b{{declspec_func}}\s*(\() | ||||||||||
- match: \b({{declspec_func}})\s*(\() | ||||||||||
captures: | ||||||||||
1: storage.modifier.c | ||||||||||
2: punctuation.section.group.begin.c | ||||||||||
|
@@ -239,14 +246,14 @@ contexts: | |||||||||
- include: punctuation.comma | ||||||||||
- match: \b{{attribute_item}}\b | ||||||||||
scope: constant.other.c | ||||||||||
- match: \b{{attribute_func}}\s*(\() | ||||||||||
- match: \b({{attribute_func}})\s*(\() | ||||||||||
captures: | ||||||||||
1: storage.modifier.c | ||||||||||
2: punctuation.section.group.begin.c | ||||||||||
push: enclosure.parenthesis | ||||||||||
- match: \)\) | ||||||||||
scope: punctuation.section.group.end.c | ||||||||||
pop: 2 | ||||||||||
pop: 1 | ||||||||||
|
||||||||||
keyword.storage: | ||||||||||
- match: \bauto\b | ||||||||||
|
@@ -334,7 +341,6 @@ contexts: | |||||||||
|
||||||||||
type.enum-body: | ||||||||||
- meta_content_scope: meta.block.c | ||||||||||
- meta_include_prototype: false | ||||||||||
- match: \b{{identifier}}\b | ||||||||||
scope: entity.name.constant.c | ||||||||||
push: | ||||||||||
|
@@ -472,6 +478,7 @@ contexts: | |||||||||
- meta_scope: meta.function.c | ||||||||||
- match: ; | ||||||||||
pop: 1 | ||||||||||
- include: gnu-attribute | ||||||||||
- match: \{ | ||||||||||
scope: punctuation.section.block.begin | ||||||||||
set: function.body | ||||||||||
|
@@ -490,7 +497,7 @@ contexts: | |||||||||
pop: 1 | ||||||||||
- include: enclosure | ||||||||||
|
||||||||||
- match: ({{identifier}})\b(?=[,\)]|$) | ||||||||||
- match: ({{identifier}})\s*(?=[,\)]|$) | ||||||||||
captures: | ||||||||||
1: variable.parameter.c | ||||||||||
- include: expression | ||||||||||
|
@@ -505,103 +512,151 @@ contexts: | |||||||||
- match: \b{{identifier}}\b | ||||||||||
|
||||||||||
statement: | ||||||||||
- match: (?=\S) | ||||||||||
push: | ||||||||||
- match: ; | ||||||||||
scope: punctuation.terminator.c | ||||||||||
pop: 1 | ||||||||||
- include: expression | ||||||||||
- match: ; | ||||||||||
scope: punctuation.terminator.c | ||||||||||
pop: 1 | ||||||||||
- include: expression | ||||||||||
|
||||||||||
main: | ||||||||||
- include: preprocessor | ||||||||||
- include: function | ||||||||||
- include: statement | ||||||||||
- match: (?=\S) | ||||||||||
push: statement | ||||||||||
|
||||||||||
prototype: | ||||||||||
- include: preprocessor.comment | ||||||||||
- match: \\$ | ||||||||||
- include: comment | ||||||||||
- include: preprocessor | ||||||||||
|
||||||||||
preprocessor.line-escape: | ||||||||||
- match: \\$\n | ||||||||||
scope: punctuation.separator.continuation.c | ||||||||||
push: | ||||||||||
- match: ^ | ||||||||||
pop: 1 | ||||||||||
preprocessor.include: | ||||||||||
- meta_scope: meta.preprocessor.c | ||||||||||
- match: \" | ||||||||||
scope: punctuation.definition.string.begin.c | ||||||||||
push: string.double | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strings are commonly used in various contexts and thus may deserve a dedicated context. Maybe something like:
Suggested change
And in "literal" or "constants" section: string.quoted.double:
- match: \"
scope: punctuation.definition.string.begin.c
push: string.quoted.double.body
string.quoted.double.body:
- match: \"
scope: punctuation.definition.string.end.c
pop: 1
|
||||||||||
- match: \< | ||||||||||
scope: punctuation.definition.string.begin.c | ||||||||||
push: string.angled | ||||||||||
- include: eol-pop | ||||||||||
preprocessor.diagnostic: | ||||||||||
- meta_scope: meta.preprocessor.diagnostic.c | ||||||||||
- meta_content_scope: string.unquoted.c | ||||||||||
- include: preprocessor.line-escape | ||||||||||
- include: eol-pop | ||||||||||
|
||||||||||
preprocessor.define-body: | ||||||||||
- match: '' | ||||||||||
set: main | ||||||||||
with_prototype: | ||||||||||
- match: \b__VA_ARGS__\b | ||||||||||
scope: constant.other.c | ||||||||||
- match: \b__VA_OPT__\b | ||||||||||
scope: keyword.operator.word.c | ||||||||||
- match: \# | ||||||||||
scope: keyword.operator.c | ||||||||||
- include: preprocessor.line-escape | ||||||||||
preprocessor.define-params: | ||||||||||
- include: eol-pop | ||||||||||
- match: \b{{identifier}}\b | ||||||||||
scope: variable.parameter.c | ||||||||||
- include: punctuation.comma | ||||||||||
- include: operator.variadic | ||||||||||
- match: \) | ||||||||||
scope: punctuation.section.group.end.c | ||||||||||
embed: preprocessor.define-body | ||||||||||
escape: (?<!\\)\n | ||||||||||
- include: else-pop | ||||||||||
preprocessor.define: | ||||||||||
- include: eol-pop | ||||||||||
- match: \s*({{identifier}})\s*(\() | ||||||||||
captures: | ||||||||||
1: entity.name.macro.c support.macro.c | ||||||||||
2: punctuation.section.group.begin.c | ||||||||||
set: preprocessor.define-params | ||||||||||
- match: \b{{identifier}}\b | ||||||||||
scope: entity.name.macro.c support.macro.c | ||||||||||
embed: preprocessor.define-body | ||||||||||
escape: (?<!\\)\n | ||||||||||
preprocessor.embed-enclosure: | ||||||||||
- match: \) | ||||||||||
scope: punctuation.section.group.end.c | ||||||||||
pop: 1 | ||||||||||
- include: number | ||||||||||
- include: operator | ||||||||||
- include: punctuation | ||||||||||
- include: string | ||||||||||
preprocessor.embed: | ||||||||||
- match: \" | ||||||||||
scope: punctuation.definition.string.begin.c | ||||||||||
push: string.double | ||||||||||
- match: \< | ||||||||||
scope: punctuation.definition.string.begin.c | ||||||||||
push: string.angled | ||||||||||
- match: \b(?:limit|prefix|suffix|if_empty)\b | ||||||||||
scope: keyword.other.c | ||||||||||
- match: \( | ||||||||||
scope: punctuation.section.group.begin.c | ||||||||||
push: preprocessor.embed-enclosure | ||||||||||
- include: eol-pop | ||||||||||
preprocessor: | ||||||||||
- include: preprocessor.line-escape | ||||||||||
|
||||||||||
# Everything after this comment needs to be rewritten so don't pay too much mind | ||||||||||
- match: ^\s*#\s*((?:el)?if(?:n?def)?|undef|pragma)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
push: | ||||||||||
- meta_scope: meta.preprocessor.c | ||||||||||
- include: eol-pop | ||||||||||
|
||||||||||
preprocessor: | ||||||||||
- include: preprocessor.comment | ||||||||||
- match: ^\s*#\s*(?=(if|elif|endif|else|ifndef|ifdef|undef|include(_next)?|define|error|warning|pragma)\b) | ||||||||||
- match: ^\s*#\s*(else|endif)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
push: preprocessor.directive | ||||||||||
preprocessor.directive: | ||||||||||
- meta_scope: meta.preprocessor.c | ||||||||||
|
||||||||||
- match: \bifndef|ifdef|if|elif\b | ||||||||||
- match: ^\s*#\s*(include|include_next)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
set: | ||||||||||
- match: ^ | ||||||||||
pop: 1 | ||||||||||
push: preprocessor.include | ||||||||||
|
||||||||||
- match: \belse|endif\b | ||||||||||
- match: ^\s*#\s*(embed)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
pop: 1 | ||||||||||
push: preprocessor.embed | ||||||||||
|
||||||||||
- match: \b(warning|error)\b | ||||||||||
scope: meta.preprocessor.diagnostic.c keyword.control.import.error.c | ||||||||||
set: | ||||||||||
- meta_content_scope: meta.preprocessor.diagnostic.c string.quoted.c | ||||||||||
- include: string | ||||||||||
- match: ^\s*#\s*(define)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
push: preprocessor.define | ||||||||||
|
||||||||||
- match: ^\s*#\s*(undef)\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
push: | ||||||||||
- meta_scope: meta.preprocessor.c | ||||||||||
- include: eol-pop | ||||||||||
|
||||||||||
- match: \binclude(_next)?\b | ||||||||||
scope: meta.preprocessor.include.c keyword.control.import.include.c | ||||||||||
set: | ||||||||||
- meta_content_scope: meta.preprocessor.include.c | ||||||||||
- match: < | ||||||||||
push: | ||||||||||
- meta_scope: string.quoted.c | ||||||||||
- match: ">" | ||||||||||
pop: 1 | ||||||||||
- match: \" | ||||||||||
push: | ||||||||||
- meta_scope: string.quoted.c | ||||||||||
- match: \" | ||||||||||
pop: 1 | ||||||||||
- match: ^\s*#\s*(error)\b | ||||||||||
scope: keyword.control.import.error.c | ||||||||||
push: preprocessor.diagnostic | ||||||||||
|
||||||||||
- match: ^ | ||||||||||
pop: 1 | ||||||||||
- match: ^\s*#\s*(warning)\b | ||||||||||
scope: keyword.control.import.warning.c | ||||||||||
push: preprocessor.diagnostic | ||||||||||
|
||||||||||
- match: \bundef|pragma\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
set: | ||||||||||
- meta_content_scope: meta.preprocessor.c | ||||||||||
- match: ^ | ||||||||||
pop: 1 | ||||||||||
comment: | ||||||||||
- match: // | ||||||||||
scope: punctuation.definition.comment.c | ||||||||||
push: | ||||||||||
- meta_scope: comment.line.double-slash.c | ||||||||||
- include: preprocessor.line-escape | ||||||||||
- include: eol-pop | ||||||||||
|
||||||||||
- match: \bdefine\b | ||||||||||
scope: keyword.control.import.c | ||||||||||
set: | ||||||||||
- match: ^ | ||||||||||
pop: 1 | ||||||||||
preprocessor.comment: | ||||||||||
- match: /\* | ||||||||||
scope: punctuation.definition.comment.c | ||||||||||
push: | ||||||||||
- meta_scope: comment.block.c | ||||||||||
- match: '\\$\n' | ||||||||||
scope: punctuation.separator.continuation.c | ||||||||||
- include: preprocessor.line-escape | ||||||||||
- match: \*/ | ||||||||||
scope: punctuation.definition.comment.c | ||||||||||
pop: 1 | ||||||||||
- match: // | ||||||||||
scope: punctuation.definition.comment.c | ||||||||||
push: | ||||||||||
- meta_scope: comment.line.double-slash.c | ||||||||||
- match: '(\\)$\n' | ||||||||||
captures: | ||||||||||
1: punctuation.separator.continuation.c | ||||||||||
pop: 1 | ||||||||||
- match: (?=\n) | ||||||||||
pop: 1 | ||||||||||
- match: \*/ | ||||||||||
scope: invalid.illegal.stray-comment-end.c | ||||||||||
|
||||||||||
# Helpers | ||||||||||
|
||||||||||
|
@@ -614,6 +669,9 @@ contexts: | |||||||||
eol-pop: | ||||||||||
- match: $\n? | ||||||||||
pop: 1 | ||||||||||
consume-pop: | ||||||||||
camila314 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
- match: . | ||||||||||
pop: 1 | ||||||||||
|
||||||||||
variables: | ||||||||||
identifier: \b[[:alpha:]_][[:alnum:]_]*\b | ||||||||||
|
@@ -629,7 +687,7 @@ variables: | |||||||||
dec_exponent: '(?:[eE][-+]?\d*)' | ||||||||||
hex_exponent: '(?:[pP][-+]?\d*)' | ||||||||||
|
||||||||||
declspec_item: '(allocator|appdomain|deprecated|dllimport|dllexport|empty_bases|hybrid_patchable|jitintrinsic|naked|noalias|noinline|noreturn|nothrow|novtable|no_sanitize_address|process|restrict|safebuffers|selectany|thread)' | ||||||||||
declspec_func: '(align|allocate|code_seg|spectre|uuid|deprecated)' | ||||||||||
attribute_item: '(noreturn|pure|const|malloc|cold|hot|deprecated|always_inline|noinline|packed|unused|used|leaf|artificial|flatten|noclone|returns_twice|weak|no_reorder|minsize|externally_visible|constructor|destructor)' | ||||||||||
attribute_func: '(aligned|format|nonnull|section|visibility|alias|ifunc|target|alloc_size|cleanup|warning|error|cold_hot_partitioning|no_sanitize|optimize)' | ||||||||||
declspec_item: '(?:allocator|appdomain|deprecated|dllimport|dllexport|empty_bases|hybrid_patchable|jitintrinsic|naked|noalias|noinline|noreturn|nothrow|novtable|no_sanitize_address|process|restrict|safebuffers|selectany|thread)' | ||||||||||
declspec_func: '(?:align|allocate|code_seg|spectre|uuid|deprecated)' | ||||||||||
attribute_item: '(?:noreturn|pure|const|malloc|cold|hot|deprecated|always_inline|noinline|packed|unused|used|leaf|artificial|flatten|noclone|returns_twice|weak|no_reorder|minsize|externally_visible|constructor|destructor)' | ||||||||||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.