Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alaingilbert/agl
/ functions
Functions
2,276 in github.com/alaingilbert/agl
⨍
Functions
2,276
◇
Types & classes
311
↓ 548 callers
Function
NewTest
(src string, opts ...TestOption)
pkg/agl/infer_test.go:67
↓ 469 callers
Function
WithMutEnforced
(v bool)
pkg/agl/infer_test.go:61
↓ 455 callers
Function
testCodeGen2
(t *testing.T, expected string, test *Test, opts ...GeneratorOption)
pkg/agl/codegen_test.go:25
↓ 411 callers
Method
SetType
(a ast.Node, t types.Type, opts ...SetTypeOption)
pkg/agl/infer.go:223
↓ 241 callers
Method
String
()
pkg/types/types.go:15
↓ 228 callers
Method
DefineFn
(nenv *Env, name string, fnStr string, opts ...SetTypeOption)
pkg/agl/env.go:1248
↓ 200 callers
Method
genExpr
(e ast.Expr)
pkg/agl/codegen.go:880
↓ 156 callers
Method
TypeAt
(row, col int)
pkg/agl/infer_test.go:98
↓ 151 callers
Method
Pos
()
pkg/ast/ast.go:38
↓ 146 callers
Method
errorf
(n ast.Node, f string, args ...any)
pkg/agl/infer.go:82
↓ 136 callers
Method
Define
(n ast.Node, name string, typ types.Type, opts ...SetTypeOption)
pkg/agl/env.go:1273
↓ 120 callers
Method
GetType
(n ast.Node)
pkg/agl/infer.go:180
↓ 113 callers
Method
expect
(tok token.Token)
pkg/parser/parser.go:337
↓ 111 callers
Method
expr
(e ast.Expr)
pkg/agl/infer.go:955
↓ 101 callers
Function
Unwrap
(t Type)
pkg/types/types.go:712
↓ 101 callers
Method
next
Advance to the next non-comment token. In the process, collect any comment groups encountered, and remember the last lead and line comments. A lead c
pkg/parser/parser.go:253
↓ 91 callers
Method
T
(name string, typ Type)
pkg/types/types.go:815
↓ 82 callers
Method
GoStrType
()
pkg/types/types.go:14
↓ 81 callers
Method
End
position of first character belonging to the node
pkg/ast/ast.go:39
↓ 80 callers
Method
GetType
(x ast.Node)
pkg/agl/env.go:1392
↓ 80 callers
Method
Next
()
pkg/agl/core/core.go:1303
↓ 78 callers
Method
GetType2
(n ast.Node)
pkg/agl/infer.go:189
↓ 77 callers
Method
Unwrap
()
pkg/agl/core/core.go:90
↓ 76 callers
Method
Get
(name string)
pkg/agl/env.go:1196
↓ 73 callers
Method
Contains
(pkg string)
pkg/agl/infer.go:362
↓ 71 callers
Method
GetType2
(x ast.Node, fset *token.FileSet)
pkg/agl/env.go:1399
↓ 71 callers
Method
IsValid
IsValid reports whether the position is valid.
pkg/token/position.go:92
↓ 69 callers
Function
trace
(p *parser, msg string)
pkg/parser/parser.go:127
↓ 69 callers
Function
un
Usage pattern: defer un(trace(p, "..."))
pkg/parser/parser.go:134
↓ 68 callers
Function
to
(v any)
pkg/agl/utils.go:131
↓ 65 callers
Function
EmitWith
(g *Generator, n ast.Node)
pkg/agl/codegen.go:1565
↓ 63 callers
Function
WithDesc
(desc string)
pkg/agl/infer.go:217
↓ 62 callers
Method
Error
()
pkg/agl/utils.go:123
↓ 61 callers
Method
GoStr
()
pkg/types/types.go:13
↓ 60 callers
Method
GetFn
(name string)
pkg/agl/env.go:1229
↓ 58 callers
Function
testGenOutput
(src string)
e2eTests/e2e_test.go:67
↓ 57 callers
Function
MakeOptionSome
(t T)
pkg/agl/core/core.go:119
↓ 54 callers
Method
IsNone
()
pkg/agl/core/core.go:86
↓ 54 callers
Method
Position
Position returns the Position value for the given file position p. If p is out of bounds, it is adjusted to match the File.Offset behavior. Calling f.
pkg/token/position.go:400
↓ 52 callers
Method
next
Read the next Unicode char into s.ch. s.ch < 0 means end-of-file. For optimization, there is some overlap between this method and s.scanIdentifier.
pkg/scanner/scanner.go:59
↓ 45 callers
Method
Iter
()
pkg/agl/core/core.go:1299
↓ 42 callers
Method
GetNameInfo
(name string)
pkg/agl/env.go:1215
↓ 36 callers
Method
IntoRecv
(idTT Type)
pkg/types/types.go:819
↓ 34 callers
Method
Add
(depth int, lbl string)
pkg/agl/env.go:388
↓ 32 callers
Function
Walk
TODO(gri): Investigate if providing a closure to Walk leads to simpler use (and may help eliminate Inspect in turn). Walk traverses an AST in depth-fi
pkg/ast/walk.go:33
↓ 32 callers
Method
error
(pos token.Pos, msg string)
pkg/parser/parser.go:295
↓ 29 callers
Method
printf
printf is a convenience wrapper that takes care of print errors.
pkg/ast/print.go:128
↓ 27 callers
Method
Emit
(s string, opts ...EmitOption)
pkg/agl/codegen.go:305
↓ 27 callers
Function
enosys
()
docs/wasm_exec.js:8
↓ 26 callers
Method
GetGoType2
(pkgName string, x goast.Node, keepRaw bool)
pkg/agl/env.go:1831
↓ 25 callers
Method
GetParam
(i int)
pkg/types/types.go:804
↓ 25 callers
Method
errorExpected
(pos token.Pos, msg string)
pkg/parser/parser.go:318
↓ 25 callers
Method
incrPrefix
(clb func() string)
pkg/agl/codegen.go:1085
↓ 25 callers
Method
stmt
(s ast.Stmt)
pkg/agl/infer.go:1087
↓ 24 callers
Function
MapJoin
(e Emitter, a []T, clb func(T) string, sep string)
pkg/agl/codegen.go:1555
↓ 24 callers
Method
expectSemi
expectSemi consumes a semicolon and returns the applicable line comment.
pkg/parser/parser.go:369
↓ 24 callers
Method
genStmt
(s ast.Stmt)
pkg/agl/codegen.go:832
↓ 22 callers
Method
Pos
(n ast.Node)
pkg/agl/infer.go:4348
↓ 22 callers
Method
error
(offs int, msg string)
pkg/scanner/scanner.go:157
↓ 21 callers
Function
walkList
(v Visitor, list []N)
pkg/ast/walk.go:19
↓ 20 callers
Function
cmpTypesLoose
(a, b types.Type)
pkg/agl/infer.go:3449
↓ 20 callers
Method
genExprs
(e []ast.Expr)
pkg/agl/codegen.go:3909
↓ 19 callers
Function
ReplGenM
(t Type, m map[string]Type)
pkg/types/types.go:949
↓ 19 callers
Method
parseType
---------------------------------------------------------------------------- Types
pkg/parser/parser.go:642
↓ 18 callers
Method
withEnv
(clb func())
pkg/agl/infer.go:168
↓ 17 callers
Method
Keys
()
pkg/agl/infer.go:354
↓ 17 callers
Method
Name
Name returns the file name of file f as registered with AddFile.
pkg/token/position.go:116
↓ 17 callers
Method
SetTypeForce
(a ast.Node, t types.Type)
pkg/agl/infer.go:193
↓ 17 callers
Method
closeScope
()
pkg/parser/resolver.go:100
↓ 17 callers
Method
parseRhs
()
pkg/parser/parser.go:2415
↓ 16 callers
Function
mergeB
mergeB returns the concatenated before-statements of the given fragments.
pkg/agl/codegen.go:4434
↓ 16 callers
Method
openScope
(pos token.Pos)
pkg/parser/resolver.go:89
↓ 16 callers
Method
parseIdent
()
pkg/parser/parser.go:530
↓ 15 callers
Method
Base
Base returns the base offset of file f as registered with AddFile.
pkg/token/position.go:121
↓ 15 callers
Function
InArray
InArray returns either or not a string is in an array
pkg/agl/utils.go:241
↓ 15 callers
Function
Must
Must ...
pkg/agl/utils.go:164
↓ 15 callers
Method
withOptType
(n ast.Node, t types.Type, clb func())
pkg/agl/infer.go:140
↓ 14 callers
Method
InferFile
(fileName string, f *ast.File, fset *token.FileSet, mutEnforced bool)
pkg/agl/infer.go:40
↓ 14 callers
Method
parseExpr
The result may be a type or even a raw type ([...]int).
pkg/parser/parser.go:2407
↓ 13 callers
Function
MapJoin
(a []T, clb func(T) string, sep string)
pkg/utils/utils.go:67
↓ 13 callers
Function
fnvHash
(by []byte)
pkg/agl/core/core.go:1124
↓ 12 callers
Method
Len
()
pkg/agl/core/core.go:1330
↓ 12 callers
Function
NewEnv
(fset *token.FileSet)
pkg/agl/env.go:1163
↓ 11 callers
Method
Contains
(el T)
pkg/agl/core/core.go:1665
↓ 11 callers
Function
Ternary
Ternary ...
pkg/utils/utils.go:72
↓ 11 callers
Method
checkLambdaArg
checkLambdaArg type-checks a callback argument against the inferred function type want. A short function literal is assigned want directly; other form
pkg/agl/infer.go:2712
↓ 10 callers
Function
AglCleanupIntString
(s string)
pkg/agl/core/core.go:2152
↓ 10 callers
Method
Concrete
(typs []Type)
pkg/types/types.go:825
↓ 10 callers
Method
Error
()
main.go:137
↓ 10 callers
Method
IsSome
()
pkg/agl/core/core.go:82
↓ 10 callers
Function
NewFileSet
NewFileSet creates a new file set.
pkg/token/position.go:437
↓ 10 callers
Method
advance
advance consumes tokens until the current token p.tok is in the 'to' set, or token.EOF. For error recovery.
pkg/parser/parser.go:419
↓ 10 callers
Function
cmpTypes
(a, b types.Type)
pkg/agl/infer.go:3467
↓ 10 callers
Function
funcTypeToFuncType
(name string, expr *ast.FuncType, env *Env, fset *token.FileSet, native bool)
pkg/agl/env.go:195
↓ 10 callers
Function
lineAt
(fset *token.FileSet, pos token.Pos)
pkg/ast/import.go:66
↓ 10 callers
Function
lower
(ch rune)
pkg/scanner/scanner.go:440
↓ 10 callers
Method
parseBlockStmt
()
pkg/parser/parser.go:1699
↓ 10 callers
Method
push
push pops all nodes that appear lexically before n and then pushes n on the stack.
pkg/ast/commentmap.go:94
↓ 9 callers
Function
incNestLev
(p *parser)
pkg/parser/parser.go:142
↓ 9 callers
Method
loadPkgAglStd
(depth int, t *TreeDrawer, nenv *Env, path, pkgName string, m *PkgVisited)
pkg/agl/env.go:794
next →
1–100 of 2,276, ranked by callers