@@ -1,5 +1,6 @@
|
||||
{
|
||||
"name": "hurl",
|
||||
"word": "identifier",
|
||||
"rules": {
|
||||
"source_file": {
|
||||
"type": "REPEAT",
|
||||
@@ -111,6 +112,10 @@
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "json_request_declaration"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "text_body_declaration"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -170,6 +175,62 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"text_body_declaration": {
|
||||
"type": "PREC_LEFT",
|
||||
"value": 5,
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "```"
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "_line"
|
||||
},
|
||||
{
|
||||
"type": "IMMEDIATE_TOKEN",
|
||||
"content": {
|
||||
"type": "PATTERN",
|
||||
"value": "[\\r\\n]+"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "```\\n\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"header_declaration": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
@@ -316,6 +377,10 @@
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "VIEW"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "const_pattern"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -356,6 +421,10 @@
|
||||
"type": "STRING",
|
||||
"value": "HTTP"
|
||||
},
|
||||
"const_pattern": {
|
||||
"type": "PATTERN",
|
||||
"value": "[A-Z_0-9\\/\\\\\\d]+"
|
||||
},
|
||||
"comment": {
|
||||
"type": "PREC_LEFT",
|
||||
"value": 1,
|
||||
@@ -403,6 +472,10 @@
|
||||
"type": "PATTERN",
|
||||
"value": "[^\\n]+"
|
||||
},
|
||||
"identifier": {
|
||||
"type": "PATTERN",
|
||||
"value": "[A-Za-z_.\\d\\u00A1-\\uFFFF-]+"
|
||||
},
|
||||
"_whitespace": {
|
||||
"type": "REPEAT1",
|
||||
"content": {
|
||||
|
@@ -30,6 +30,10 @@
|
||||
{
|
||||
"type": "json_request_declaration",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "text_body_declaration",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -103,7 +107,17 @@
|
||||
{
|
||||
"type": "request_literal",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
"fields": {},
|
||||
"children": {
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "const_pattern",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "response",
|
||||
@@ -155,6 +169,11 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text_body_declaration",
|
||||
"named": true,
|
||||
"fields": {}
|
||||
},
|
||||
{
|
||||
"type": ":",
|
||||
"named": false
|
||||
@@ -255,6 +274,10 @@
|
||||
"type": "]",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "const_pattern",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "header_name",
|
||||
"named": true
|
||||
|
6525
src/parser.c
6525
src/parser.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user