From 6d2380326a67a00eeae31689c00936da6f3526d2 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 19 Dec 2016 15:37:54 +0100 Subject: stdlib: Allow characters in types and constant patterns Characters ($char) can be used in constant pattern expressions. They can also be used in types and contracts. --- lib/stdlib/src/erl_parse.yrl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/stdlib/src/erl_parse.yrl') diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 4f38256e6b..5656155c53 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -156,6 +156,7 @@ type -> '#' atom '{' field_types '}' : {type, ?anno('$1'), record, ['$2'|'$4']}. type -> binary_type : '$1'. type -> integer : '$1'. +type -> char : '$1'. type -> 'fun' '(' ')' : {type, ?anno('$1'), 'fun', []}. type -> 'fun' '(' fun_type_100 ')' : '$3'. -- cgit v1.2.3