diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg index f143bbd38..728db6307 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/JavaScript/JavaScript.stg @@ -36,12 +36,12 @@ * REQUIRED. */ -pythonTypeInitMap ::= [ - "bool":"False", +javascriptTypeInitMap ::= [ + "bool":"false", "int":"0", "float":"0.0", "str":"", - default:"None" // anything other than a primitive type is an object + default:"{}" // anything other than a primitive type is an object ] // args must be , @@ -863,7 +863,7 @@ var serializedATN = [" "}>"].join(""); * must be an object, default value is "null". */ initValue(typeName) ::= << - + >> codeFileExtension() ::= ".js" diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Python2/Python2.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Python2/Python2.stg index b01a76fc4..570f1659f 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Python2/Python2.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Python2/Python2.stg @@ -809,7 +809,7 @@ def serializedATN(): * must be an object, default value is "null". */ initValue(typeName) ::= << - + >> codeFileExtension() ::= ".py" diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/Python3/Python3.stg b/tool/resources/org/antlr/v4/tool/templates/codegen/Python3/Python3.stg index 081e3f3f1..34e525b85 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/Python3/Python3.stg +++ b/tool/resources/org/antlr/v4/tool/templates/codegen/Python3/Python3.stg @@ -816,7 +816,7 @@ def serializedATN(): * must be an object, default value is "null". */ initValue(typeName) ::= << - + >> codeFileExtension() ::= ".py"