nar_compiler

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

README

Nar compiler package

Contains code of compiler.

See main repository for more information.

Documentation

Index

Constants

View Source
const (
	KwModule   = "module"
	KwImport   = "import"
	KwAs       = "as"
	KwExposing = "exposing"
	KwInfix    = "infix"
	KwAlias    = "alias"
	KwType     = "type"
	KwDef      = "def"
	KwHidden   = "hidden"
	KwNative   = "native"
	KwLeft     = "left"
	KwRight    = "right"
	KwNon      = "non"
	KwIf       = "if"
	KwThen     = "then"
	KwElse     = "else"
	KwLet      = "let"
	KwIn       = "in"
	KwSelect   = "select"
	KwCase     = "case"
	KwEnd      = "end"

	SeqComment          = "//"
	SeqCommentStart     = "/*"
	SeqCommentEnd       = "*/"
	SeqExposingAll      = "*"
	SeqParenthesisOpen  = "("
	SeqParenthesisClose = ")"
	SeqBracketsOpen     = "["
	SeqBracketsClose    = "]"
	SeqBracesOpen       = "{"
	SeqBracesClose      = "}"
	SeqComma            = ","
	SeqColon            = ":"
	SeqEqual            = "="
	SeqBar              = "|"
	SeqUnderscore       = "_"
	SeqDot              = "."
	SeqMinus            = "-"
	SeqLambda           = "\\("
	SeqLambdaBind       = "->"
	SeqCaseBind         = "->"
	SeqInfixChars       = "!#$%&*+-/:;<=>?^|~`"

	SmbNewLine     = '\n'
	SmbQuoteString = '"'
	SmbQuoteChar   = '\''
	SmbEscape      = '\\'
)

Variables

Functions

func Compile

func Compile(
	log *logger.LogWriter,
	packages []locator.Package,
	parsedModules map[ast.QualifiedIdentifier]*parsed.Module,
	normalizedModules map[ast.QualifiedIdentifier]*normalized.Module,
	typedModules map[ast.QualifiedIdentifier]*typed.Module,
) (affectedModuleNames []ast.QualifiedIdentifier)

func Parse

func Parse(filePath string, fileContent []rune) (*parsed.Module, []error)

Types

This section is empty.

Directories

Path Synopsis
ast

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL