Link | tags_findcustom |
Author | Jason Huck |
Category | Tags |
Version | 8.x |
License | http://opensource.org/licenses/artistic-license.php |
Posted | 28 May 2006 |
Updated | 28 May 2006 |
More by this author... |
Parses the supplied raw Lasso code and returns a set containing all the custom tags used in it. Requires [tags_native].
// the tag [image_scalewithin] uses [math_proportion] var('data') = include_raw('/path/to/image_scalewithin.inc'); tags_findcustom(#data); -> set: math_proportion
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag( 'findcustom', -namespace='tags_', -req='code', -priority='replace', -description='Parses the supplied raw Lasso code and returns a set containing all the custom tags used in it.' ); local('tokens') = lasso_parser( #code, -delimiters, -plaintext ); local( 'tags' = set, 'lastToken' = '' ); while(#tokens->hasmore); local('name' = #tokens->next); if( #tokens->tokentype == 'KEYWORD' && !#name->beginswith('/') && (: '#', '$', '->') !>> #lastToken && tags_native !>> #name ); #tags->insert(#name); /if; #lastToken = #name; /while; return(#tags); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft