From 02cafc218d2b2589430f74d72ebc21e89b21e0ec Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 7 Mar 2017 08:23:41 +0100 Subject: Also accept system keyword in record fields --- README.md | 17 ++++++++++++----- frontend/scanner.icl | 1 - 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a0e90e9..3c02a28 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This is a fork to implement experimental new features. 1\. [Syntactic sugar](#1-syntactic-sugar) 1.1. [Lambda-case](#11-lambda-case) 2\. [Syntax changes](#2-syntax-changes) -2.1. [Use of the `module` keyword](#21-use-of-the-module-keyword) +2.1. [Use of module header keywords](#21-use-of-module-header-keywords) --- @@ -52,16 +52,23 @@ LambdaAbstr = ... ## 2. Syntax changes -### 2.1. Use of the `module` keyword +### 2.1. Use of module header keywords -The `module` keyword is only a keyword on the topmost level. This allows for -using it as a record field, for example: +Four keywords are now only recognised on the topmost level. This allows for +using them as a record field, for example: ```clean :: MyType = { module :: Int } ``` -However, it is not allowed to define a function named `module`. +The keywords are: + + - `module` + - `definition` + - `implementation` + - `system` + +It is not allowed to define a function named as one of these keywords. [clean]: http://clean.cs.ru.nl [cocl]: https://svn.cs.ru.nl/repos/clean-compiler/ diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 0d33341..fbd52c9 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -876,7 +876,6 @@ CheckFunctContext s input "False" -> (BoolToken False , input) "case" -> (CaseToken , input) "of" -> (OfToken , input) - "system" -> (SysModuleToken , input) "from" -> (FromToken , input) "let" # (strict, input) = determineStrictness input -> (LetToken strict, input) -- cgit v1.2.3