Kaynağa Gözat

Call inline a storage class specifier like static

pull/8/head
Max Brunsfeld 8 yıl önce
ebeveyn
işleme
c4ed85b79b
4 değiştirilmiş dosya ile 36391 ekleme ve 36408 silme
  1. +1
    -1
      corpus/declarations.txt
  2. +4
    -7
      grammar.js
  3. +4
    -12
      src/grammar.json
  4. +36382
    -36388
      src/parser.c

+ 1
- 1
corpus/declarations.txt Dosyayı Görüntüle

@ -233,7 +233,7 @@ int static inline do_stuff(int arg1) {
(function_definition
(type_identifier)
(storage_class_specifier)
(function_specifier)
(storage_class_specifier)
(function_declarator
(identifier)
(parameter_list (parameter_declaration (type_identifier) (identifier))))

+ 4
- 7
grammar.js Dosyayı Görüntüle

@ -170,14 +170,12 @@ module.exports = grammar({
_declaration_specifiers: $ => seq(
repeat(choice(
$.storage_class_specifier,
$.type_qualifier,
$.function_specifier
$.type_qualifier
)),
$._type_specifier,
repeat(choice(
$.storage_class_specifier,
$.type_qualifier,
$.function_specifier
$.type_qualifier
))
),
@ -271,7 +269,8 @@ module.exports = grammar({
'extern',
'static' ,
'auto',
'register'
'register',
'inline'
),
type_qualifier: $ => choice(
@ -280,8 +279,6 @@ module.exports = grammar({
'volatile'
),
function_specifier: $ => 'inline',
_type_specifier: $ => choice(
$.struct_specifier,
$.union_specifier,

+ 4
- 12
src/grammar.json Dosyayı Görüntüle

@ -668,10 +668,6 @@
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "SYMBOL",
"name": "function_specifier"
}
]
}
@ -692,10 +688,6 @@
{
"type": "SYMBOL",
"name": "type_qualifier"
},
{
"type": "SYMBOL",
"name": "function_specifier"
}
]
}
@ -1210,6 +1202,10 @@
{
"type": "STRING",
"value": "register"
},
{
"type": "STRING",
"value": "inline"
}
]
},
@ -1230,10 +1226,6 @@
}
]
},
"function_specifier": {
"type": "STRING",
"value": "inline"
},
"_type_specifier": {
"type": "CHOICE",
"members": [

+ 36382
- 36388
src/parser.c
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


Yükleniyor…
İptal
Kaydet