aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorHugo Herbelin2016-03-13 13:18:10 +0100
committerHugo Herbelin2016-03-13 13:18:54 +0100
commitd868820ad1f00b896c5f44f18678fac2f8e0f720 (patch)
tree2312a62d9fd275d1c70b5e4fabcbe308826d5a05 /stm
parent7478ad7cc600753ba2609254657c87cacc27e8fc (diff)
Supporting "(@foo) args" in patterns, where "@foo" has no arguments.
Diffstat (limited to 'stm')
-rw-r--r--stm/texmacspp.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/stm/texmacspp.ml b/stm/texmacspp.ml
index 5bd1569ce5..3c4b8cb71e 100644
--- a/stm/texmacspp.ml
+++ b/stm/texmacspp.ml
@@ -304,7 +304,13 @@ and pp_cases_pattern_expr cpe =
xmlApply loc
(xmlOperator "alias" ~attr:["name", string_of_id id] loc ::
[pp_cases_pattern_expr cpe])
- | CPatCstr (loc, ref, cpel1, cpel2) ->
+ | CPatCstr (loc, ref, None, cpel2) ->
+ xmlApply loc
+ (xmlOperator "reference"
+ ~attr:["name", Libnames.string_of_reference ref] loc ::
+ [Element ("impargs", [], []);
+ Element ("args", [], (List.map pp_cases_pattern_expr cpel2))])
+ | CPatCstr (loc, ref, Some cpel1, cpel2) ->
xmlApply loc
(xmlOperator "reference"
~attr:["name", Libnames.string_of_reference ref] loc ::