File tree Expand file tree Collapse file tree 3 files changed +79
-70
lines changed Expand file tree Collapse file tree 3 files changed +79
-70
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ Comments
6
6
still
7
7
*/ UPDATE FILE '' DELETE 1
8
8
9
- -- Comment
10
- CREATE FILE 'a--b'
9
+ # Comment
10
+ CREATE FILE 'a--b#c##d '
11
11
WITH CONTENT '''
12
12
/* content */
13
- a -- content --
13
+ a -- content --
14
+ b # content #
14
15
'''
15
16
16
17
---
Original file line number Diff line number Diff line change @@ -11,73 +11,81 @@ INSERT BEFORE 1
11
11
WHEN EMPTY THEN REMOVE
12
12
WHEN LINE "asdf" THEN BREAK
13
13
WHEN "asdf" THEN BREAK
14
- WHEN 5 THEN SUB r"pattern" r"replacement" BREAK
15
- ELSE SUB r"pattern" r'replacement'
14
+ WHEN 5 THEN SUB
15
+ r"pattern" # Comment
16
+ r"replacement"
17
+ BREAK
18
+ ELSE SUB
19
+ r"pattern" # Comment
20
+ r'replacement' # Comments
16
21
END;
17
22
18
23
---
19
24
20
- (source_file
21
- (update_command
22
- (singlefile_clause
23
- (string
24
- (single_quoted_string)))
25
- (update_move_mos_clause
26
- (marker_or_segment
27
- (segment
28
- (relpos_segment_start
29
- (relpos_at
30
- (marker
31
- (line_matcher
32
- (line_base
33
- (number))))))
34
- (relpos_segment_end
35
- (relpos_beforeafter
36
- (marker
37
- (line_matcher
38
- (line_base
39
- (number))))))))
40
- (update_move_clause_destination
41
- (insert_clause
42
- (relpos_bai
43
- (relpos_beforeafter
44
- (marker
45
- (line_matcher
46
- (line_base
47
- (number)))))))
48
- (relative_indentation
25
+ (source_file
26
+ (update_command
27
+ (singlefile_clause
28
+ (string
29
+ (single_quoted_string)))
30
+ (update_move_mos_clause
31
+ (marker_or_segment
32
+ (segment
33
+ (relpos_segment_start
34
+ (relpos_at
35
+ (marker
36
+ (line_matcher
37
+ (line_base
38
+ (number))))))
39
+ (relpos_segment_end
40
+ (relpos_beforeafter
41
+ (marker
42
+ (line_matcher
43
+ (line_base
44
+ (number))))))))
45
+ (update_move_clause_destination
46
+ (insert_clause
47
+ (relpos_bai
48
+ (relpos_beforeafter
49
+ (marker
50
+ (line_matcher
51
+ (line_base
52
+ (number)))))))
53
+ (relative_indentation
54
+ (number))
55
+ (line_filter
56
+ (case_stmt
57
+ (line_base)
58
+ (case_action)
59
+ (line_base
60
+ (string
61
+ (single_quoted_string)))
62
+ (case_action
63
+ (loop_control
64
+ (loop_break)))
65
+ (line_base
66
+ (string
67
+ (single_quoted_string)))
68
+ (case_action
69
+ (loop_control
70
+ (loop_break)))
71
+ (line_base
49
72
(number))
50
- (line_filter
51
- (case_stmt
52
- (line_base)
53
- (case_action)
54
- (line_base
55
- (string
56
- (single_quoted_string)))
57
- (case_action
58
- (loop_control
59
- (loop_break)))
60
- (line_base
61
- (string
62
- (single_quoted_string)))
63
- (case_action
64
- (loop_control
65
- (loop_break)))
66
- (line_base
67
- (number))
68
- (case_action
69
- (string
70
- (raw_string))
71
- (string
72
- (raw_string))
73
- (loop_control
74
- (loop_break)))
75
- (case_action
76
- (string
77
- (raw_string))
78
- (string
79
- (raw_string))))))))
80
- (command_separator))
73
+ (case_action
74
+ (string
75
+ (raw_string))
76
+ (comment)
77
+ (string
78
+ (raw_string))
79
+ (loop_control
80
+ (loop_break)))
81
+ (case_action
82
+ (string
83
+ (raw_string))
84
+ (comment)
85
+ (string
86
+ (raw_string)))
87
+ (comment))))))
88
+ (command_separator))
81
89
82
90
==================
83
91
UPDATE Identifier Move WHOLE CASE filter
Original file line number Diff line number Diff line change 2
2
UPDATE Single File
3
3
==================
4
4
5
- -- Remarks
5
+ # Remarks
6
6
UPDATE FILE "/path/to/file.js"
7
7
REPLACE LINE "old" WITH CONTENT "new line content";
8
8
@@ -20,8 +20,8 @@ WITH CONTENT """
20
20
def other_function(x):
21
21
"""
22
22
23
- UPDATE FILE "file" REPLACE WHOLE WITH CONTENT "Single line"; -- Preferred
24
- UPDATE FILE "file" REPLACE BODY WITH CONTENT "Single line"; -- Synonym
23
+ UPDATE FILE "file" REPLACE WHOLE WITH CONTENT "Single line"; # Preferred
24
+ UPDATE FILE "file" REPLACE BODY WITH CONTENT "Single line"; # Synonym
25
25
26
26
UPDATE FILE "/config/settings.json"
27
27
REPLACE SEGMENT
@@ -59,8 +59,8 @@ DELETE SEGMENT
59
59
STARTING AT LINE "\"database\": {" OFFSET 1
60
60
ENDING BEFORE LINE "}";
61
61
62
- UPDATE FILE "file" DELETE WHOLE -- Preferred;
63
- UPDATE FILE "file" DELETE BODY -- Synonym;
62
+ UPDATE FILE "file" DELETE WHOLE # Preferred;
63
+ UPDATE FILE "file" DELETE BODY # Synonym;
64
64
65
65
---
66
66
You can’t perform that action at this time.
0 commit comments