Part of the Exercism Wren Stack.
The Wren Representer takes input Wren source and generates a normalized representation of that source with most of the named symbols replaced with idenfitiers instead. The output format format resembles Wren source except:
String
, Num
, etc) are left intactnew
is always left intact as a convention---
and ordered by filename (with the main solution file always leading)For example if given a directory of two files:
// rna_lib.wren
var LIB = [1,2,3]
// rna.wren
var DNA_TO_RNA = {
"G": "C",
"C": "G",
"T": "A",
"A": "U"
}
class DNA {
static toRNA(strand) {
return strand.map {|x| DNA_TO_RNA[x] }.join("")
}
}
The representation would be:
var @IDENT1@ = { " A " : " U " , " C " : " G " , " G " : " C " , " T " : " A " }
class @IDENT2@ {
static @IDENT3@ ( @IDENT4@ )
{
return
@IDENT4@ . map { | @IDENT5@ |
@IDENT1@ [ @IDENT5@ ] } . join ( " " ) } }
----
var @IDENT6@ = [ 1 , 2 , 3 ]
----
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4