mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-21 10:29:02 +00:00
unescape backslash-doublequote for DSL string literals
This commit is contained in:
parent
f05bbee932
commit
2e3d844a9f
3 changed files with 4 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "../lib/mlrutil.h"
|
||||
#include "../containers/mlr_dsl_ast.h"
|
||||
#include "../containers/sllv.h"
|
||||
|
||||
|
|
@ -800,7 +801,7 @@ md_string(A) ::= MD_TOKEN_STRING(B). {
|
|||
char* stripped = &input[1];
|
||||
int len = strlen(input);
|
||||
stripped[len-2] = 0;
|
||||
A = mlr_dsl_ast_node_alloc(stripped, B->type);
|
||||
A = mlr_dsl_ast_node_alloc(mlr_unbackslash(stripped), B->type);
|
||||
}
|
||||
md_regexi(A) ::= MD_TOKEN_REGEXI(B). {
|
||||
char* input = B->text;
|
||||
|
|
|
|||
|
|
@ -11019,7 +11019,7 @@ AST BEGIN STATEMENTS (0):
|
|||
AST MAIN STATEMENTS (1):
|
||||
=~ (operator):
|
||||
y (field_name).
|
||||
\".. (strnum_literal).
|
||||
".. (strnum_literal).
|
||||
AST END STATEMENTS (0):
|
||||
x=ABCDE,y="GHI"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ TOP-OF-LIST SUMMARY
|
|||
* rh/fedora/centos mlr-3.4.0
|
||||
|
||||
* \" in string-literal reader ... fix up in the parser or in rval_expr.
|
||||
* basenaming syntax for subselector emits
|
||||
~ oosvar-to-oosvar assignments with treecopy
|
||||
~ subselector emits
|
||||
~ horizontality of emits
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue