Greg Ward avatar Greg Ward committed 72cacf3

runtime: (temporarily) remove support for keyword args

Since the parser doesn't handle them yet, it seems silly to waste time
making the runtime handle them.

Comments (0)

Files changed (2)

src/fubsy/runtime/builtins_test.go

 	defer cleanup2()
 
 	args := FunctionArgs{
-		args:   types.MakeFuList(),
-		kwargs: make(map[string]types.FuObject),
+		args: types.MakeFuList(),
 	}
 
 	result, errs := fn_println(args)
 	// cases where a user-defined list becomes the arg list, and it
 	// just happens to be empty
 	args := FunctionArgs{
-		args:   []types.FuObject{},
-		kwargs: make(map[string]types.FuObject),
+		args: []types.FuObject{},
 	}
 	result, errs := fn_mkdir(args)
 	assert.Nil(t, result)
 	defer cleanup()
 
 	args := FunctionArgs{
-		args:   types.MakeFuList(),
-		kwargs: make(map[string]types.FuObject),
+		args: types.MakeFuList(),
 	}
 
 	// remove() doesn't care about empty arg list (same reason as mkdir())

src/fubsy/runtime/execute.go

 }
 
 func (self FunctionArgs) KeywordArgs() types.ValueMap {
-	return self.kwargs
+	panic("kwargs not supported yet")
+	//return self.kwargs
 }
 
 func (self FunctionArgs) KeywordArg(name string) (types.FuObject, bool) {
-	value, ok := self.kwargs[name]
-	return value, ok
+	panic("kwargs not supported yet")
+	//value, ok := self.kwargs[name]
+	//return value, ok
 }
 
 // other methods that might come in handy
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.