From f19aa703c320814eafe1a3b34373a896a4f70c30 Mon Sep 17 00:00:00 2001 From: crc Date: Tue, 20 Aug 2019 18:25:44 +0000 Subject: [PATCH] retro-tags.forth now has a shell component as well FossilOrigin-Name: a432bb9ba44249ca0231ffa6883c5182c8f4d573071df06e62d268f1dfe01e17 --- example/retro-tags.forth | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/example/retro-tags.forth b/example/retro-tags.forth index 6edf4c6..085940f 100755 --- a/example/retro-tags.forth +++ b/example/retro-tags.forth @@ -1,4 +1,14 @@ -#!/usr/bin/env retro +#!/bin/sh + +# ------------------------------------------------------------ + +rm tags +touch tags +for f in *.forth; do retro $0 "$f" >>tags ; done +for f in *.retro; do retro $0 "$f" >>tags ; done +exit + +-------------------------------------------------------------- This will scan a source file and create output for a `tags` file in the minimal *ctags* format. In this, the tags file @@ -10,7 +20,7 @@ I am using the line number as the tag address. To generate a tags file: - retro-tags sourcefile > tags + retro-tags To start, I bring in the `retro-unu` tool to locate the code blocks and call a combinator for each line in the code block.