소스 검색

Handle postfix type qualifiers in compound literals

Fixes atom/language-c#312
pull/17/head
Max Brunsfeld 7 년 전
부모
커밋
175d93b439
4개의 변경된 파일27932개의 추가작업 그리고 27846개의 파일을 삭제
  1. +8
    -1
      corpus/expressions.txt
  2. +1
    -0
      grammar.js
  3. +7
    -0
      src/grammar.json
  4. +27916
    -27845
      src/parser.c

+ 8
- 1
corpus/expressions.txt 파일 보기

@ -346,6 +346,7 @@ int main() {
7,
8
};
z = (char const []) {'a', 'b'};
}
---
@ -374,7 +375,13 @@ int main() {
(type_descriptor (struct_specifier (type_identifier)))
(initializer_list
(number_literal)
(number_literal))))))))
(number_literal)))))
(expression_statement
(assignment_expression
(identifier)
(compound_literal_expression
(type_descriptor (primitive_type) (type_qualifier) (abstract_array_declarator))
(initializer_list (char_literal) (char_literal))))))))
============================================
Compound literals with trailing commas

+ 1
- 0
grammar.js 파일 보기

@ -600,6 +600,7 @@ module.exports = grammar({
type_descriptor: $ => seq(
repeat($.type_qualifier),
$._type_specifier,
repeat($.type_qualifier),
optional($._abstract_declarator)
),

+ 7
- 0
src/grammar.json 파일 보기

@ -3399,6 +3399,13 @@
"type": "SYMBOL",
"name": "_type_specifier"
},
{
"type": "REPEAT",
"content": {
"type": "SYMBOL",
"name": "type_qualifier"
}
},
{
"type": "CHOICE",
"members": [

+ 27916
- 27845
src/parser.c
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장