{"modulePath":"github.com/glojurelang/glojure","version":"v0.6.2","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package reader\n\n## Variables\n\n```go\nvar (\n\n\t// ErrEOF is returned when the end of the input is reached after\n\t// all input has been read. Callers can check for this error to\n\t// determine if an error is due to malformed input or exhausted\n\t// input. ErrEOF will only be returned when a form could not be\n\t// read because the input was exhausted, not when a form was\n\t// malformed.\n\tErrEOF = errors.New(\"EOF\")\n)\n```\n\n## Types\n\n```go\ntype Error struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (e *Error) Error() string\n```\n\n```go\nfunc (e *Error) Unwrap() error\n```\n\n```go\ntype Option func(*options)\n```\nOption represents an option that can be passed to New.\n\n```go\nfunc WithFilename(filename string) Option\n```\nWithFilename sets the filename to be associated with the input.\n\n```go\nfunc WithGetCurrentNS(getCurrentNS func() *lang.Namespace) Option\n```\nWithGetCurrentNS sets the function to be used to get the current namespace.\n\n```go\nfunc WithSymbolResolver(resolver SymbolResolver) Option\n```\nWithSymbolResolver sets the symbol resolver to be used when reading.\n\n```go\ntype Reader struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(r io.RuneScanner, opts ...Option) *Reader\n```\n\n```go\nfunc (r *Reader) ReadAll() ([]interface{}, error)\n```\nRead reads all expressions from the input until a read error occurs or io.EOF is reached. A final io.EOF will not be returned if the input ends with a valid expression or if it contains no expressions at all.\n\n```go\nfunc (r *Reader) ReadOne() (interface{}, error)\n```\nReadOne reads the next expression from the input. If the input contains more than one expression, subsequent calls to ReadOne will return the next expression. If the input contains no expressions, ErrEOF will be returned.\n\n```go\ntype SymbolResolver interface {\n\tCurrentNS() *lang.Symbol\n\tResolveStruct(*lang.Symbol) *lang.Symbol\n\tResolveAlias(*lang.Symbol) *lang.Symbol\n\tResolveVar(*lang.Symbol) *lang.Symbol\n}\n```\n\n","path":"github.com/glojurelang/glojure/pkg/reader","name":"reader","synopsis":"","isRedistributable":true}
