From ed93a451a6a4bfffc27b000bdab3bbdc6fa6c6c8 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Thu, 9 Jun 2016 11:45:10 -0700 Subject: [PATCH] core: add LEFT-DECORATOR: syntax. rename syntax.arity to syntax.attributes --- core/bootstrap/stage1.factor | 2 +- core/bootstrap/syntax.factor | 1 + .../arity.factor => attributes/attributes.factor} | 10 ++++++++-- core/syntax/{arity => attributes}/authors.txt | 0 core/syntax/syntax.factor | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) rename core/syntax/{arity/arity.factor => attributes/attributes.factor} (65%) rename core/syntax/{arity => attributes}/authors.txt (100%) diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index df3684d187..cdbbc0de76 100644 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -37,7 +37,7 @@ load-help? off "vocabs.loader" require "syntax" require - "syntax.arity" require + "syntax.attributes" require "bootstrap.layouts" require ! need this diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 44530d05b3..c8edf6e58d 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -17,6 +17,7 @@ in: bootstrap.syntax "C:" "char:" "ARITY:" + "LEFT-DECORATOR:" "DEFER:" "defer:" "ERROR:" diff --git a/core/syntax/arity/arity.factor b/core/syntax/attributes/attributes.factor similarity index 65% rename from core/syntax/arity/arity.factor rename to core/syntax/attributes/attributes.factor index 26881fd81c..b6024e3326 100644 --- a/core/syntax/arity/arity.factor +++ b/core/syntax/attributes/attributes.factor @@ -9,7 +9,7 @@ ARITY: \ SYMBOL: 1 ARITY: \ SINGLETON: 1 ARITY: \ B: 1 ARITY: \ MAIN: 1 - +ARITY: \ LEFT-DECORATOR: 1 ARITY: \ ALIAS: 2 ARITY: \ ARITY: 2 @@ -20,7 +20,13 @@ ARITY: \ INSTANCE: 2 ARITY: \ GENERIC: 2 ARITY: \ PRIMITIVE: 2 - ARITY: \ GENERIC# 3 ARITY: \ HOOK: 3 +LEFT-DECORATOR: \ inline +LEFT-DECORATOR: \ foldable +LEFT-DECORATOR: \ flushable +LEFT-DECORATOR: \ recursive +LEFT-DECORATOR: \ final +LEFT-DECORATOR: \ delimiter +LEFT-DECORATOR: \ deprecated diff --git a/core/syntax/arity/authors.txt b/core/syntax/attributes/authors.txt similarity index 100% rename from core/syntax/arity/authors.txt rename to core/syntax/attributes/authors.txt diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index aba2b98c6c..07e8a06518 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -310,6 +310,10 @@ in: bootstrap.syntax scan-escaped-word scan-number "arity" set-word-prop ] define-core-syntax + "LEFT-DECORATOR:" [ + scan-escaped-word t "left-decorator" set-word-prop + ] define-core-syntax + "<<" [ [ \ >> parse-until >quotation