module lang::rascal::tutor::Names
rascal-0.40.13-BOOT2
rascal-tutor-0.19.9
Usage
import lang::rascal::tutor::Names;
Dependencies
import String;
import Location;
import List;
import IO;
import util::Reflective;
data PathConfig
data PathConfig (
str packageName="",
str packageGroup="",
loc packageRoot=|unknown:///|,
loc sources=|http://github.com/usethesource/rascal|,
loc issues=|http://github.com/usethesource/rascal/issues|,
loc license=|cwd:///LICENSE.md|,
loc citation=|cwd:///CITATION.md|,
loc funding=|cwd:///FUNDING.md|,
loc releaseNotes=|cwd:///RELEASE-NOTES.md|,
str packageVersion=getRascalVersion(),
bool isPackageCourse=false
)
data PathConfig (loc currentRoot = |unknown:///|, loc currentFile = |unknown:///|)
data Message
data Message (str cause="")
function fragment
default str fragment(loc root, loc concept)
str fragment(loc root, loc concept)
str fragment(loc root, loc concept)
function modulePath
str modulePath(/^<prefix:.*>::Index$/)
default str modulePath(str moduleName)
function moduleFragment
default str moduleFragment(str moduleName)
function package
capitalizes and removes hyphens
default str package(str input)
str package(str input:/^[a-z].*$/)
str package(/^<prefix:[a-zA-Z\_0-9]*>\-<rest:.*>$/)
function removeSpaces
str removeSpaces(/^<prefix:.*><spaces:\s+><postfix:.*>$/)
default str removeSpaces(str s)
function addSpaces
str addSpaces(/^<prefix:[^:]+>:<postfix:[^:].*>$/)
str addSpaces(/^<prefix:.+>::<name:[^:]+>$/)
str addSpaces(/^<prefix:[A-Za-z0-9\ ]+[a-z0-9]><postfix:[A-Z].+>/)
default str addSpaces(str s)
function pathToRoot
produces "../../.."
for pathToRoot(|aap:///a/b|, |aap:///a/b/c/d|)
str pathToRoot(loc root, loc src, bool isPackageCourse)
str pathToRoot(loc root, loc src, bool isPackageCourse)