Skip to content

Commit

Permalink
Migrate to infix notation for name expansion in .piqi
Browse files Browse the repository at this point in the history
  • Loading branch information
alavrik committed Mar 5, 2017
1 parent c58feb0 commit 3b114f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions piqic-ocaml/piqi.ocaml.piqi
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@
%

.extend [
(.typedef int uint)
.typedef* [ int uint ]
.with.ocaml-type "int"
]

.extend [
(.typedef int32 uint32)
.typedef* [ int32 uint32 ]
.with.ocaml-type "int32"
]

.extend [
(.typedef int64 uint64)
.typedef* [ int64 uint64 ]
.with.ocaml-type "int64"
]

.extend [
(.typedef float64 float32)
.typedef* [ float64 float32 ]
.with.ocaml-type "float"
]

Expand Down Expand Up @@ -65,7 +65,7 @@
]

.extend [
(.field piqi.module import.module)
.field* [ piqi.module import.module ]

.with.ocaml-name "modname"
]
Expand All @@ -84,5 +84,5 @@
]


(.custom-field ocaml-type ocaml-name)
.custom-field* [ ocaml-type ocaml-name ]

6 changes: 3 additions & 3 deletions piqic-ocaml/piqi.piqi-ocaml.piqi
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


.extend [
(.typedef record field variant option enum alias list import function)
.typedef* [ record field variant option enum alias list import function ]

.with.field [
.name ocaml-name
Expand All @@ -37,7 +37,7 @@


.extend [
(.typedef piqi import)
.typedef* [ piqi import ]

.with.field [
.name ocaml-module
Expand All @@ -60,7 +60,7 @@

% flag for representing repeated fields and lists as OCaml arrays
.extend [
(.typedef field list)
.typedef* [ field list ]

.with.field [
.name ocaml-array
Expand Down

0 comments on commit 3b114f7

Please sign in to comment.