Browse Source

fix: Adding default stdlib_gen

Matthias Ladkau 3 years ago
parent
commit
0a1c57bbac
2 changed files with 41 additions and 1 deletions
  1. 0 1
      .gitignore
  2. 41 0
      stdlib/stdlib_gen.go

+ 0 - 1
.gitignore

@@ -7,7 +7,6 @@ ecal
 /coverage.html
 /dist
 /build
-/stdlib/stdlib_gen.go
 /ecal-support/node_modules
 /ecal-support/out
 /ecal-support/*.vsix

+ 41 - 0
stdlib/stdlib_gen.go

@@ -0,0 +1,41 @@
+// Code generated by ecal/stdlib/generate; DO NOT EDIT.
+
+package stdlib
+
+import (
+	"fmt"
+	"math"
+	"reflect"
+)
+
+/*
+genStdlib contains all generated stdlib constructs.
+*/
+var genStdlib = map[interface{}]interface{}{
+	"math-synopsis": "Mathematics-related constants and functions",
+	"math-const":    mathConstMap,
+	"math-func":     mathFuncMap,
+	"math-func-doc": mathFuncDocMap,
+}
+
+/*
+mathConstMap contains the mapping of stdlib math constants.
+*/
+var mathConstMap = map[interface{}]interface{}{
+	"E":   float64(math.E),
+	"Phi": float64(math.Phi),
+	"Pi":  float64(math.Pi),
+}
+
+/*
+mathFuncDocMap contains the documentation of stdlib math functions.
+*/
+var mathFuncDocMap = map[interface{}]interface{}{}
+
+/*
+mathFuncMap contains the mapping of stdlib math functions.
+*/
+var mathFuncMap = map[interface{}]interface{}{}
+
+// Dummy statement to prevent declared and not used errors
+var Dummy = fmt.Sprint(reflect.ValueOf(fmt.Sprint))