fix: free text

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-07-04 23:01:24 +02:00
parent 20ea4b66b9
commit ce031caef4
7 changed files with 4454 additions and 2254 deletions

View File

@@ -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": {

View File

@@ -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

File diff suppressed because it is too large Load Diff