From 85df7feacac36f5cd058e86ff81b3f4aa9f0ded8 Mon Sep 17 00:00:00 2001 From: s-ol Date: Tue, 11 Feb 2020 18:35:26 +0100 Subject: new Registry tagging mechanism --- core/parsing.moon | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/parsing.moon') diff --git a/core/parsing.moon b/core/parsing.moon index 5186cb8..c23b7b7 100644 --- a/core/parsing.moon +++ b/core/parsing.moon @@ -1,5 +1,6 @@ import Const from require 'core.const' import Cell, RootCell from require 'core.cell' +import Tag from require 'core.registry' import R, S, P, V, C, Ct from require 'lpeg' -- whitespace @@ -29,7 +30,7 @@ atom = num + sym + str expr = (V 'cell') + atom explist = Ct mspace * (V 'expr') * (space * (V 'expr'))^0 * mspace -tag = (P '[') * atom * (P ']') +tag = (P '[') * (digit^1 / Tag\parse) * (P ']') cell = (P '(') * tag^-1 * (V 'explist') * (P ')') / Cell\parse root = P { -- cgit v1.2.3