Skip to content

Commit

Permalink
add tests for #176
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hykin committed May 18, 2019
1 parent 67e63a4 commit 4cf4db5
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/fixtures/issues/176.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int foo() {
switch(a) {
case FOO:
{ FileAccessControl.UserFlashAddess = 1; }
case BAR:
FileAccessControl.UserFlashAddess = 1;
};
}
128 changes: 128 additions & 0 deletions test/specs/issues/176.c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
- source: int
scopes:
- storage.type.built-in.primitive.c
- source: foo
scopesBegin:
- meta.function.c
- meta.function.definition.parameters.c
scopes:
- entity.name.function.c
- source: (
scopes:
- punctuation.section.parameters.begin.bracket.round.c
- source: )
scopes:
- punctuation.section.parameters.end.bracket.round.c
scopesEnd:
- meta.function.c
- meta.function.definition.parameters.c
- source: '{'
scopesBegin:
- meta.block.c
scopes:
- punctuation.section.block.begin.bracket.curly.c
- source: switch
scopesBegin:
- meta.block.switch.c
- meta.head.switch.c
scopes:
- keyword.control.switch.c
- source: (
scopesBegin:
- meta.conditional.switch.c
scopes:
- punctuation.section.parens.begin.bracket.round.conditional.switch.c
- source: a
- source: )
scopes:
- punctuation.section.parens.end.bracket.round.conditional.switch.c
scopesEnd:
- meta.conditional.switch.c
- source: '{'
scopes:
- punctuation.section.block.begin.bracket.curly.switch.c
scopesEnd:
- meta.head.switch.c
- source: case
scopesBegin:
- meta.body.switch.c
- meta.conditional.case.c
scopes:
- keyword.control.case.c
- source: ' FOO'
- source: ':'
scopes:
- colon.c
- punctuation.separator.case.c
scopesEnd:
- meta.conditional.case.c
- source: '{'
scopesBegin:
- meta.block.c
scopes:
- punctuation.section.block.begin.bracket.curly.c
- source: FileAccessControl
scopes:
- variable.other.object.access.c
- source: .
scopes:
- punctuation.separator.dot-access.c
- source: UserFlashAddess
scopes:
- variable.other.member.c
- source: =
scopes:
- keyword.operator.assignment.c
- source: '1'
scopes:
- constant.numeric.decimal.c
- source: ;
scopes:
- punctuation.terminator.statement.c
- source: '}'
scopes:
- punctuation.section.block.end.bracket.curly.c
scopesEnd:
- meta.block.c
- source: case
scopesBegin:
- meta.conditional.case.c
scopes:
- keyword.control.case.c
- source: ' BAR'
- source: ':'
scopes:
- colon.c
- punctuation.separator.case.c
scopesEnd:
- meta.conditional.case.c
- source: FileAccessControl
scopes:
- variable.other.object.access.c
- source: .
scopes:
- punctuation.separator.dot-access.c
- source: UserFlashAddess
scopes:
- variable.other.member.c
- source: =
scopes:
- keyword.operator.assignment.c
- source: '1'
scopes:
- constant.numeric.decimal.c
- source: ;
scopes:
- punctuation.terminator.statement.c
- source: '}'
scopes:
- punctuation.section.block.end.bracket.curly.switch.c
scopesEnd:
- meta.block.switch.c
- meta.body.switch.c
- source: ;
scopes:
- punctuation.terminator.statement.c
- source: '}'
scopes:
- punctuation.section.block.end.bracket.curly.c

0 comments on commit 4cf4db5

Please sign in to comment.