├── .gitignore
├── LICENSE
├── README.md
└── extension
├── FakeMakerDevtoolsPage.html
├── FakeMakerDevtoolsPage.js
├── Makefile
├── Panel
├── FakeMakerPanel.css
├── FakeMakerPanel.html
├── FakeMakerPanel.js
├── doors.css
├── doors.html
└── doors.js
├── README.md
├── TraceSaveButton.css
├── TraceSaveButton.js
├── TraceSideBarPane.html
├── http
└── expressServer.js
├── lib
├── AttachWindowProxyToGlobalsTransformer.js
├── FakeCommon.js
├── FakeMaker.js
├── FakePlayer.js
├── FileNamer.js
├── ScopeAttacher.js
├── TraceDecoder.js
├── TraceFunctionsTransformer.js
├── WrapNewObjectTransformer.js
├── applyFakeMaker.js
├── applyFakePlayer.js
├── dummyDefine.js
├── dumpeur.js
├── fakeMakerCompiler-import.js
├── fakeMakerCompiler.js
├── loadByXHR.js
├── traceFunctionsPreprocessor.js
└── traceFunctionsRuntime.js
├── manifest.json
├── package.json
├── test
├── FakeMakerUnitTest.html
├── FakeMakerUnitTest.js
├── ForEachProxyList.html
├── TestDriver.js
├── jsonSaveRestore.js
├── testCurrentScript.html
├── testIframeLoader.html
├── testSetPropertyDescriptor.html
├── testTraceDecoder.html
├── testTraceDecoder.js
├── testTraceFunctions.html
├── testWindowDispatchEvent.html
└── unitTest.css
├── third_party
├── DevtoolsExtended
│ ├── DebugLogger.js
│ ├── InspectedWindow.js
│ ├── RuntimeModifier.js
│ ├── RuntimeStatus.js
│ ├── RuntimeStatusButton.css
│ ├── RuntimeStatusButton.js
│ ├── RuntimeStatusPage.html
│ └── mixinPropertyEvent.js
└── traceur-compiler
│ ├── .gitignore
│ ├── .npmignore
│ ├── .travis.yml
│ ├── AUTHORS
│ ├── CONTRIBUTING.md
│ ├── LICENSE
│ ├── Makefile
│ ├── README.md
│ ├── bin
│ └── traceur.js
│ ├── build
│ ├── build-parse-tree-transformer.js
│ ├── build-parse-tree-type.js
│ ├── build-parse-tree-visitor.js
│ ├── build-parse-trees.js
│ ├── build-test-list.js
│ ├── build-unicode-tables.js
│ ├── expand-js-template.js
│ ├── incrementSemver.js
│ ├── minifier.js
│ ├── parse-tree-transformer.header
│ ├── parse-tree-visitor.header
│ ├── prepublish.js
│ ├── printSemver.js
│ └── util.js
│ ├── codereview.settings
│ ├── demo
│ ├── SourceMapMapping.js
│ ├── async-read-file.js
│ ├── await.html
│ ├── expressServer.js
│ ├── generators.js
│ ├── parallel-fibonacci.js
│ ├── repl-module.js
│ ├── repl.html
│ ├── repl.js
│ ├── replOptions.js
│ └── transcode.js
│ ├── example
│ └── hello.html
│ ├── index.html
│ ├── logo
│ ├── tc.ai
│ ├── tc.eps
│ ├── tc.jpg
│ ├── tc.png
│ └── tc.svg
│ ├── package.json
│ ├── src
│ ├── WebPageTranscoder.js
│ ├── bootstrap.js
│ ├── codegeneration
│ │ ├── AlphaRenamer.js
│ │ ├── AmdTransformer.js
│ │ ├── AnnotationsTransformer.js
│ │ ├── ArrayComprehensionTransformer.js
│ │ ├── ArrowFunctionTransformer.js
│ │ ├── AssignmentPatternTransformer.js
│ │ ├── BlockBindingTransformer.js
│ │ ├── ClassTransformer.js
│ │ ├── CloneTreeTransformer.js
│ │ ├── CommonJsModuleTransformer.js
│ │ ├── ComprehensionTransformer.js
│ │ ├── CoverFormalsTransformer.js
│ │ ├── DefaultParametersTransformer.js
│ │ ├── DestructuringTransformer.js
│ │ ├── ExplodeExpressionTransformer.js
│ │ ├── FindInFunctionScope.js
│ │ ├── FindVisitor.js
│ │ ├── ForOfTransformer.js
│ │ ├── FromOptionsTransformer.js
│ │ ├── GeneratorComprehensionTransformer.js
│ │ ├── GeneratorTransformPass.js
│ │ ├── HoistVariablesTransformer.js
│ │ ├── InlineModuleTransformer.js
│ │ ├── InstantiateModuleTransformer.js
│ │ ├── MakeStrictTransformer.js
│ │ ├── ModuleTransformer.js
│ │ ├── MultiTransformer.js
│ │ ├── NumericLiteralTransformer.js
│ │ ├── ObjectLiteralTransformer.js
│ │ ├── ParameterTransformer.js
│ │ ├── ParseTreeFactory.js
│ │ ├── PlaceholderParser.js
│ │ ├── PrependStatements.js
│ │ ├── PropertyNameShorthandTransformer.js
│ │ ├── PureES6Transformer.js
│ │ ├── RestParameterTransformer.js
│ │ ├── SpreadTransformer.js
│ │ ├── SuperTransformer.js
│ │ ├── SymbolTransformer.js
│ │ ├── TempVarTransformer.js
│ │ ├── TemplateLiteralTransformer.js
│ │ ├── TypeAssertionTransformer.js
│ │ ├── TypeToExpressionTransformer.js
│ │ ├── TypeTransformer.js
│ │ ├── UniqueIdentifierGenerator.js
│ │ ├── alphaRenameThisAndArguments.js
│ │ ├── assignmentOperatorToBinaryOperator.js
│ │ ├── generator
│ │ │ ├── AsyncTransformer.js
│ │ │ ├── AwaitState.js
│ │ │ ├── BreakContinueTransformer.js
│ │ │ ├── BreakState.js
│ │ │ ├── CPSTransformer.js
│ │ │ ├── CatchState.js
│ │ │ ├── ConditionalState.js
│ │ │ ├── ContinueState.js
│ │ │ ├── EndState.js
│ │ │ ├── FallThroughState.js
│ │ │ ├── FinallyFallThroughState.js
│ │ │ ├── FinallyState.js
│ │ │ ├── ForInTransformPass.js
│ │ │ ├── GeneratorTransformer.js
│ │ │ ├── ReturnState.js
│ │ │ ├── State.js
│ │ │ ├── StateAllocator.js
│ │ │ ├── SwitchState.js
│ │ │ ├── TryState.js
│ │ │ └── YieldState.js
│ │ ├── globalThis.js
│ │ ├── module
│ │ │ ├── AttachModuleNameTransformer.js
│ │ │ ├── DirectExportVisitor.js
│ │ │ ├── ExportListBuilder.js
│ │ │ ├── ExportVisitor.js
│ │ │ ├── ModuleSpecifierVisitor.js
│ │ │ ├── ModuleSymbol.js
│ │ │ ├── ModuleVisitor.js
│ │ │ ├── ValidationVisitor.js
│ │ │ └── createModuleEvaluationStatement.js
│ │ └── scopeContainsThis.js
│ ├── node
│ │ ├── System.js
│ │ ├── api.js
│ │ ├── command.js
│ │ ├── compile-single-file.js
│ │ ├── compiler.js
│ │ ├── deferred.js
│ │ ├── file-util.js
│ │ ├── getopt.js
│ │ ├── inline-module.js
│ │ ├── interpreter.js
│ │ ├── nodeLoader.js
│ │ ├── require.js
│ │ ├── to-amd-compiler.js
│ │ ├── to-commonjs-compiler.js
│ │ └── traceur.js
│ ├── options.js
│ ├── outputgeneration
│ │ ├── ParseTreeMapWriter.js
│ │ ├── ParseTreeWriter.js
│ │ ├── SourceMapIntegration.js-template.js
│ │ ├── ToSource.js
│ │ ├── TreeWriter.js
│ │ └── toSource.js
│ ├── runtime
│ │ ├── InterceptOutputLoaderHooks.js
│ │ ├── InternalLoader.js
│ │ ├── Loader.js
│ │ ├── LoaderHooks.js
│ │ ├── ModuleStore.js
│ │ ├── System.js
│ │ ├── TraceurLoader.js
│ │ ├── polyfill-import.js
│ │ ├── polyfills
│ │ │ ├── ArrayIterator.js
│ │ │ ├── Promise.js
│ │ │ ├── String.js
│ │ │ ├── polyfills.js
│ │ │ └── utils.js
│ │ ├── runtime.js
│ │ ├── system-map.js
│ │ ├── url.js
│ │ └── webLoader.js
│ ├── semantics
│ │ ├── FreeVariableChecker.js
│ │ ├── VariableBinder.js
│ │ └── util.js
│ ├── staticsemantics
│ │ ├── PropName.js
│ │ └── StrictParams.js
│ ├── syntax
│ │ ├── IdentifierToken.js
│ │ ├── KeywordToken.js
│ │ ├── Keywords.js
│ │ ├── LineNumberTable.js
│ │ ├── LiteralToken.js
│ │ ├── ParseTreeValidator.js
│ │ ├── Parser.js
│ │ ├── PredefinedName.js
│ │ ├── Scanner.js
│ │ ├── SourceFile.js
│ │ ├── Token.js
│ │ ├── TokenType.js
│ │ ├── trees
│ │ │ ├── ParseTree.js
│ │ │ ├── StateMachine.js
│ │ │ └── trees.json
│ │ └── unicode-tables.js
│ ├── traceur-import.js
│ ├── traceur.js
│ └── util
│ │ ├── ArrayMap.js
│ │ ├── ErrorReporter.js
│ │ ├── JSON.js
│ │ ├── MutedErrorReporter.js
│ │ ├── ObjectMap.js
│ │ ├── SourcePosition.js
│ │ ├── SourceRange.js
│ │ ├── SyntaxErrorReporter.js
│ │ ├── TestErrorReporter.js
│ │ ├── assert.js
│ │ ├── uid.js
│ │ └── url.js
│ ├── test
│ ├── amd
│ │ ├── BasicImport.js
│ │ ├── ImportEmptyImportClause.js
│ │ ├── ImportNoImportClause.js
│ │ ├── MultipleImports.js
│ │ ├── NamedExports.js
│ │ ├── NamedImports.js
│ │ ├── NestedImport.js
│ │ └── deps
│ │ │ ├── bar.js
│ │ │ ├── foo.js
│ │ │ ├── side-effect.js
│ │ │ └── side-effect2.js
│ ├── bench
│ │ └── esprima-compare.patch
│ ├── commonjs
│ │ ├── BasicImport.js
│ │ ├── ImportEmptyImportClause.js
│ │ ├── ImportNoImportClause.js
│ │ ├── MultipleImports.js
│ │ ├── NamedImports.js
│ │ ├── NestedImport.js
│ │ └── deps
│ │ │ ├── bar.js
│ │ │ ├── foo.js
│ │ │ ├── side-effect.js
│ │ │ └── side-effect2.js
│ ├── feature
│ │ ├── Annotations
│ │ │ ├── AnnotatedFunctionTypedParam.js
│ │ │ ├── AnnotatedTypedClass.js
│ │ │ ├── AnnotatedTypedParam.js
│ │ │ ├── Class.js
│ │ │ ├── ClassConstructor.js
│ │ │ ├── ClassGeneratorMethod.js
│ │ │ ├── ClassInClass.js
│ │ │ ├── ClassInsideObjectGetter.js
│ │ │ ├── Constructor.js
│ │ │ ├── ConstructorParam.js
│ │ │ ├── Error_annotated_var.js
│ │ │ ├── ExportedClass.js
│ │ │ ├── ExportedFunction.js
│ │ │ ├── FunctionInsideClassGetter.js
│ │ │ ├── FunctionMultipleAnnotatedParameter.js
│ │ │ ├── FunctionMultipleParameters.js
│ │ │ ├── FunctionParameter.js
│ │ │ ├── GeneratorFunction.js
│ │ │ ├── GetAccessorStringName.js
│ │ │ ├── MemberExpressionAnnotation.js
│ │ │ ├── MethodParam.js
│ │ │ ├── MultipleAnnotatedFunction.js
│ │ │ ├── MultipleParameterTypes.js
│ │ │ ├── NestedFunction.js
│ │ │ ├── PropertyMethodStringName.js
│ │ │ ├── SetterParam.js
│ │ │ ├── SimpleFunction.js
│ │ │ ├── StaticGetter.js
│ │ │ ├── StaticMethod.js
│ │ │ ├── StaticSetter.js
│ │ │ ├── UnannotatedTypedClass.js
│ │ │ ├── UnannotatedUntypedFunction.js
│ │ │ └── resources
│ │ │ │ ├── exported-classes.js
│ │ │ │ ├── exported-default-class.js
│ │ │ │ ├── exported-default-function.js
│ │ │ │ ├── exported-functions.js
│ │ │ │ └── setup.js
│ │ ├── ArrayComprehension
│ │ │ ├── Closure.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_NotDefined.js
│ │ │ └── Simple.js
│ │ ├── ArrayIterator.js
│ │ ├── ArrowFunctions
│ │ │ ├── AlphaRename.js
│ │ │ ├── Arguments.js
│ │ │ ├── ArrowFunctions.js
│ │ │ ├── CoverInitialiser.js
│ │ │ ├── Error_CoverInitialiser.js
│ │ │ ├── Error_CoverInitialiser2.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_FreeVariableChecker.js
│ │ │ ├── Error_InvalidFormalParameters.js
│ │ │ ├── Error_Precedence.js
│ │ │ ├── Error_Precedence2.js
│ │ │ ├── Error_Precedence3.js
│ │ │ ├── Error_SpreadNotLast.js
│ │ │ ├── Error_SpreadOutsideFormals.js
│ │ │ ├── FreeVariableChecker.js
│ │ │ ├── Skip_Frozen.js
│ │ │ ├── Skip_InitialiserShorthand.js
│ │ │ ├── Skip_SoftBind.js
│ │ │ └── ThisBindings.js
│ │ ├── AsyncFunctions
│ │ │ ├── AlphaRenaming.js
│ │ │ ├── AsyncMethod.js
│ │ │ ├── AsyncMethodObjectLiteral.js
│ │ │ ├── AsyncSyntax.js
│ │ │ ├── Complete.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Finally.js
│ │ │ ├── PromiseCast.js
│ │ │ ├── Throw.js
│ │ │ ├── Timeout.js
│ │ │ ├── Value.js
│ │ │ └── Yield.js
│ │ ├── Classes
│ │ │ ├── ClassMethodInheritance.js
│ │ │ ├── ClassNameBinding.js
│ │ │ ├── ClassNameInStack.js
│ │ │ ├── Constructor.js
│ │ │ ├── ConstructorChaining.js
│ │ │ ├── ConstructorMember.js
│ │ │ ├── DefaultConstructor.js
│ │ │ ├── DeriveFromObject.js
│ │ │ ├── EmptyClass.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_Super.js
│ │ │ ├── Error_SuperAsTemplateTag.js
│ │ │ ├── ExtendNonConstructableFunction.js
│ │ │ ├── ExtendObject.js
│ │ │ ├── ExtendStrange.js
│ │ │ ├── FieldInheritance.js
│ │ │ ├── FieldInitializers.js
│ │ │ ├── FieldLookup.js
│ │ │ ├── Fields.js
│ │ │ ├── Getters.js
│ │ │ ├── Inheritance.js
│ │ │ ├── InheritanceFromMemberExpression.js
│ │ │ ├── InheritanceFromNonclass.js
│ │ │ ├── InheritanceNameBinding.js
│ │ │ ├── Method.js
│ │ │ ├── MethodInheritance.js
│ │ │ ├── MethodLookup.js
│ │ │ ├── NameBinding.js
│ │ │ ├── NestedClassSuper.js
│ │ │ ├── NestedClassSuperAnimal.js
│ │ │ ├── NestedFunctionSuper.js
│ │ │ ├── NewClassExpression.js
│ │ │ ├── OptionalParams.js
│ │ │ ├── PropertyAccessors.js
│ │ │ ├── PrototypeDescriptor.js
│ │ │ ├── RestParams.js
│ │ │ ├── SemiColon.js
│ │ │ ├── SimpleSuper.js
│ │ │ ├── Skip_DerivedButton.js
│ │ │ ├── Skip_HTMLBlockquoteElement.js
│ │ │ ├── Static.js
│ │ │ ├── StaticSuper.js
│ │ │ ├── StaticSuperNoExtends.js
│ │ │ ├── StaticSymbol.js
│ │ │ ├── Strict.js
│ │ │ ├── SuperChaining.js
│ │ │ ├── SuperChangeProto.js
│ │ │ ├── SuperMissing.js
│ │ │ ├── SuperPostfix.js
│ │ │ ├── SuperSet.js
│ │ │ ├── SuperUnary.js
│ │ │ ├── SuperWithoutExtends.js
│ │ │ └── Types.js
│ │ ├── ComputedPropertyNames
│ │ │ ├── Class.js
│ │ │ ├── ComputedPropertyNames.js
│ │ │ ├── Error_Disabled.js
│ │ │ └── Symbol.js
│ │ ├── DefaultParameters
│ │ │ ├── Error_SetAccessor.js
│ │ │ ├── Simple.js
│ │ │ └── Strict.js
│ │ ├── Destructuring
│ │ │ ├── Arguments.js
│ │ │ ├── Array.js
│ │ │ ├── ArrowFunction.js
│ │ │ ├── AssertObject.js
│ │ │ ├── Catch.js
│ │ │ ├── Class.js
│ │ │ ├── DefaultParams.js
│ │ │ ├── Empty.js
│ │ │ ├── Error_Catch.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_ForInWithInitializer.js
│ │ │ ├── Error_ForOfWithInitializer.js
│ │ │ ├── Error_InvalidArrowRest.js
│ │ │ ├── Error_InvalidCoverInitialisedName.js
│ │ │ ├── EvaluatesToRvalue.js
│ │ │ ├── EvaluationOrder.js
│ │ │ ├── ForInLoop.js
│ │ │ ├── ForOfLoop.js
│ │ │ ├── FunctionArrayPattern.js
│ │ │ ├── FunctionObjectPattern.js
│ │ │ ├── Initialiser.js
│ │ │ ├── Method.js
│ │ │ ├── NestedScopeArguments.js
│ │ │ ├── Object.js
│ │ │ ├── Rest.js
│ │ │ ├── ScopeThis.js
│ │ │ ├── SetAccessor.js
│ │ │ ├── Simplify.js
│ │ │ ├── Strict.js
│ │ │ ├── TopLevel.js
│ │ │ └── VarDecl.js
│ │ ├── FreeVariableChecker
│ │ │ ├── Error_With.js
│ │ │ ├── Typeof.js
│ │ │ ├── WithBasic.js
│ │ │ └── WithVarDecl.js
│ │ ├── GeneratorComprehension
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_NotDefined.js
│ │ │ ├── Simple.js
│ │ │ └── Skip_Closure.js
│ │ ├── Modules
│ │ │ ├── EmptyNamedImport.js
│ │ │ ├── Error_DuplicateImport.js
│ │ │ ├── Error_ExportKeyword.module.js
│ │ │ ├── Error_ExportKeyword2.module.js
│ │ │ ├── Error_ExportStarConflict.js
│ │ │ ├── Error_ExportStarDuplicateExport.module.js
│ │ │ ├── Error_ImportDefault.js
│ │ │ ├── Error_ImportStar.js
│ │ │ ├── Error_InvalidExport.module.js
│ │ │ ├── Error_InvalidExport2.module.js
│ │ │ ├── Error_InvalidExport3.module.js
│ │ │ ├── Error_InvalidModuleDeclaration.js
│ │ │ ├── Error_InvalidModuleDeclaration2.js
│ │ │ ├── Error_MissingExport.js
│ │ │ ├── Error_ModuleNoNewline.js
│ │ │ ├── ExportStar.js
│ │ │ ├── Exports.js
│ │ │ ├── ImportAsExportAs.js
│ │ │ ├── ImportCircular.module.js
│ │ │ ├── ImportDefault.js
│ │ │ ├── ImportEmptyImportClause.js
│ │ │ ├── ImportFromModule.js
│ │ │ ├── ImportNoImportClause.js
│ │ │ ├── ModuleDefault.js
│ │ │ ├── ModuleName.module.js
│ │ │ ├── ModuleNoNewline.js
│ │ │ ├── StaticMethod.js
│ │ │ ├── ThisInModules.js
│ │ │ └── resources
│ │ │ │ ├── TestClass.js
│ │ │ │ ├── a.js
│ │ │ │ ├── a2.js
│ │ │ │ ├── b.js
│ │ │ │ ├── c.js
│ │ │ │ ├── clockwise.js
│ │ │ │ ├── d.js
│ │ │ │ ├── default-class.js
│ │ │ │ ├── default-name.js
│ │ │ │ ├── default.js
│ │ │ │ ├── export-conflict.js
│ │ │ │ ├── f.js
│ │ │ │ ├── i.js
│ │ │ │ ├── m.js
│ │ │ │ ├── m2.js
│ │ │ │ ├── m3.js
│ │ │ │ ├── n.js
│ │ │ │ ├── o.js
│ │ │ │ ├── side-effect.js
│ │ │ │ ├── side-effect2.js
│ │ │ │ └── x.js
│ │ ├── NumericLiteral
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_NoBinaryDigits.js
│ │ │ ├── Error_NoOctalDigits.js
│ │ │ └── Simple.js
│ │ ├── ObjectAssign.js
│ │ ├── ObjectInitialiserShorthand
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_Keyword.js
│ │ │ ├── Error_MissingVar.js
│ │ │ └── Ok.js
│ │ ├── ObjectIs.js
│ │ ├── ObjectMixin.js
│ │ ├── Promise.js
│ │ ├── PromiseThrowInResolve.js
│ │ ├── PropertyMethodAssignment
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_NotNamed.js
│ │ │ └── PropertyMethodAssignment.js
│ │ ├── README
│ │ ├── Rest
│ │ │ ├── Error_NotLast.js
│ │ │ ├── Error_SetAccessor.js
│ │ │ ├── Simple.js
│ │ │ └── Strict.js
│ │ ├── Scope
│ │ │ ├── BlockBinding10.js
│ │ │ ├── BlockBinding11.js
│ │ │ ├── BlockBinding2.js
│ │ │ ├── BlockBinding3.js
│ │ │ ├── BlockBinding4.js
│ │ │ ├── BlockBinding5.js
│ │ │ ├── BlockBinding6.js
│ │ │ ├── BlockBinding7.js
│ │ │ ├── BlockBinding8.js
│ │ │ ├── BlockBinding9.js
│ │ │ ├── DeconstructingBlockBinding.js
│ │ │ ├── DeepNestedLet.js
│ │ │ ├── DeepNestedLetConst.js
│ │ │ ├── DeepNestedLetVar.js
│ │ │ ├── DeepNestedLetVarNoInit.js
│ │ │ ├── Error_BlockBinding1.js
│ │ │ ├── Error_ConstMissingInitializer.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_ForInWithInitializerConst.js
│ │ │ ├── Error_ForInWithInitializerLet.js
│ │ │ ├── Error_ForOfWithInitializerConst.js
│ │ │ ├── Error_ForOfWithInitializerLet.js
│ │ │ ├── Error_ForOfWithInitializerVar.js
│ │ │ ├── Error_ForWithoutInitializerConst.js
│ │ │ ├── Error_FunctionExpressionInBlock.js
│ │ │ ├── ForInWithInitializerVar.js
│ │ │ ├── LetForInInitializers1.js
│ │ │ ├── LetForInitializers1.js
│ │ │ ├── LetInClass.js
│ │ │ ├── LetInClosure.js
│ │ │ ├── LetInFor.js
│ │ │ ├── LetInForBreak.js
│ │ │ ├── LetInForBreakInner.js
│ │ │ ├── LetInForBreakNamed.js
│ │ │ ├── LetInForContinue.js
│ │ │ ├── LetInForContinueInner.js
│ │ │ ├── LetInForContinueNamed.js
│ │ │ ├── LetInProperties.js
│ │ │ ├── LetInitializerFor1.js
│ │ │ ├── LetInitializerFor2.js
│ │ │ ├── LetInitializerFor3.js
│ │ │ ├── LetInitializerForIn.js
│ │ │ ├── LetNoInitializer.js
│ │ │ ├── LetNoInitializerGlobal.js
│ │ │ ├── LetWithFor.js
│ │ │ ├── LetWithForIn.js
│ │ │ ├── LetWithSwitch.js
│ │ │ ├── LetWithSwitch2.js
│ │ │ ├── NameBindingInFunction.js
│ │ │ ├── NestedFunction1.js
│ │ │ ├── NestedFunction2.js
│ │ │ ├── NestedFunction3.js
│ │ │ ├── NestedLet.js
│ │ │ ├── TopLevelLet.js
│ │ │ ├── TopLevelLetConst.js
│ │ │ └── TopLevelLetVar.js
│ │ ├── Spread
│ │ │ ├── Array.js
│ │ │ ├── Call.js
│ │ │ ├── CallWithUndefined.js
│ │ │ ├── Class.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── MethodCall.js
│ │ │ ├── MethodCallQuotedName.js
│ │ │ ├── New.js
│ │ │ ├── New2.js
│ │ │ ├── NewBuiltin.js
│ │ │ └── Type.js
│ │ ├── StringExtras
│ │ │ ├── CodePointAt.js
│ │ │ ├── Contains.js
│ │ │ ├── EndsWith.js
│ │ │ ├── FromCodePoint.js
│ │ │ ├── Repeat.js
│ │ │ └── StartsWith.js
│ │ ├── Symbol
│ │ │ ├── GetOwnPropertySymbols.js
│ │ │ ├── Inherited.js
│ │ │ ├── Object.js
│ │ │ ├── ObjectModel.js
│ │ │ └── TransformationOff.js
│ │ ├── Syntax
│ │ │ ├── ArrayWithHoles.js
│ │ │ ├── Empty.js
│ │ │ ├── Error_Arguments.js
│ │ │ ├── Error_FunctionParam.js
│ │ │ ├── Error_NoLineTerminatorPostfix.js
│ │ │ ├── Error_RegExpNotClosed.js
│ │ │ ├── Error_StrictKeywordsInArguments.js
│ │ │ ├── Error_StrictKeywordsInArgumentsPattern.js
│ │ │ ├── Error_StrictKeywordsInPropertyDefinitionIdentifierReference.js
│ │ │ ├── Error_StrictKeywordsInStrict.js
│ │ │ ├── Error_UnicodeEscapeSequenceInName.js
│ │ │ ├── Error_WithInClass.js
│ │ │ ├── Error_WithInModule.module.js
│ │ │ ├── Error_WithInStrictFunction.js
│ │ │ ├── Error_WithInStrictProgram.js
│ │ │ ├── Error_YieldStarNewLine.js
│ │ │ ├── ExpressionValidation.js
│ │ │ ├── ImplicitSemiColon.js
│ │ │ ├── NumberLiteralMemberExpression.js
│ │ │ ├── RegularExpression.js
│ │ │ ├── StrictKeywords.js
│ │ │ ├── StrictKeywordsInPattern.js
│ │ │ ├── StringEscapes.js
│ │ │ ├── UnicodeEscapeSequenceInName.js
│ │ │ ├── UseStrictEscapeSequence.js
│ │ │ ├── UseStrictLineContinuation.js
│ │ │ └── null.js
│ │ ├── TempVarTransformer
│ │ │ └── UseStrictDirective.js
│ │ ├── TemplateLiterals
│ │ │ ├── CallExpression.js
│ │ │ ├── CommaExpression.js
│ │ │ ├── Default.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_InvalidSubstitution.js
│ │ │ ├── Error_InvalidSubstitution2.js
│ │ │ ├── Error_NotClosed.js
│ │ │ ├── InBlock.js
│ │ │ ├── InModule.js
│ │ │ ├── MemberExpression.js
│ │ │ ├── Strict.js
│ │ │ ├── StringRaw.js
│ │ │ ├── Tag.js
│ │ │ └── resources
│ │ │ │ ├── f.js
│ │ │ │ ├── m.js
│ │ │ │ └── n.js
│ │ ├── Tools
│ │ │ └── FreeVariableChecker.js
│ │ ├── TypeAssertions
│ │ │ ├── ClassParams.js
│ │ │ ├── ClassReturnTypes.js
│ │ │ ├── DefaultParam.js
│ │ │ ├── ExportedFunction.js
│ │ │ ├── FunctionParams.js
│ │ │ ├── FunctionReturnType.js
│ │ │ ├── NestedFunctionDefaultParam.js
│ │ │ ├── PrimitiveValueTypes.js
│ │ │ ├── Variables.js
│ │ │ └── resources
│ │ │ │ ├── assert.js
│ │ │ │ └── exported-function.js
│ │ ├── Types
│ │ │ ├── TypeAnnotations.js
│ │ │ └── TypeSyntax.js
│ │ └── Yield
│ │ │ ├── Arguments.js
│ │ │ ├── BinaryOperator.js
│ │ │ ├── Break.js
│ │ │ ├── CommaOperator.js
│ │ │ ├── Continue.js
│ │ │ ├── DefaultArguments.js
│ │ │ ├── DoGenerator.js
│ │ │ ├── DoWhileStatementWithYield.js
│ │ │ ├── EmptyGenerator.js
│ │ │ ├── Error_Disabled.js
│ │ │ ├── Error_Disabled2.js
│ │ │ ├── Error_MissingStar.js
│ │ │ ├── Finally.js
│ │ │ ├── ForEmptyGenerator.js
│ │ │ ├── ForGenerator.js
│ │ │ ├── ForInGenerator.js
│ │ │ ├── ForInGenerator2.js
│ │ │ ├── ForInGenerator3.js
│ │ │ ├── ForLexicallyNestedGenerator.js
│ │ │ ├── ForMissingParts.js
│ │ │ ├── ForOfGenerator.js
│ │ │ ├── ForStatement.js
│ │ │ ├── GeneratorReturn.js
│ │ │ ├── GeneratorSend.js
│ │ │ ├── GeneratorThrow.js
│ │ │ ├── GeneratorWithoutYieldOrReturn.js
│ │ │ ├── IfGenerator.js
│ │ │ ├── IfStatementWithYield.js
│ │ │ ├── LabelledBlockGenerator.js
│ │ │ ├── LabelledBreakGenerator.js
│ │ │ ├── MapFilterGenerator.js
│ │ │ ├── ReturnInFinally.js
│ │ │ ├── ReturnYield.js
│ │ │ ├── ReturnYieldFor.js
│ │ │ ├── SequenceGenerator.js
│ │ │ ├── SimpleGenerator.js
│ │ │ ├── StatementTestGenerator.js
│ │ │ ├── SwitchGenerator.js
│ │ │ ├── SwitchStatementWithYield.js
│ │ │ ├── This.js
│ │ │ ├── Tree.js
│ │ │ ├── Try.js
│ │ │ ├── Try10.js
│ │ │ ├── Try11.js
│ │ │ ├── Try12.js
│ │ │ ├── Try2.js
│ │ │ ├── Try3.js
│ │ │ ├── Try4.js
│ │ │ ├── Try5.js
│ │ │ ├── Try6.js
│ │ │ ├── Try7.js
│ │ │ ├── Try8.js
│ │ │ ├── Try9.js
│ │ │ ├── TryCatchGenerator.js
│ │ │ ├── TryCatchYieldGenerator.js
│ │ │ ├── TryFinallyGenerator.js
│ │ │ ├── WhileGenerator.js
│ │ │ ├── WhileStatementWithYield.js
│ │ │ ├── YieldAssignThrow.js
│ │ │ ├── YieldIdentifier.js
│ │ │ ├── YieldInFinally.js
│ │ │ ├── YieldUndefinedGenerator.js
│ │ │ ├── YieldYield.js
│ │ │ └── tryFinallyFinallyGenerator.js
│ ├── node-amd-test.js
│ ├── node-api-test.js
│ ├── node-commonjs-test.js
│ ├── node-env.js
│ ├── node-feature-test.js
│ ├── node-promise-adapter.js
│ ├── runner.html
│ ├── runtime.html
│ ├── self-compile.html
│ ├── test-utils.js
│ ├── unit
│ │ ├── codegeneration
│ │ │ ├── AmdTransformer.js
│ │ │ ├── ExplodeExpressionTransformer.js
│ │ │ ├── InlineModuleTransformer.js
│ │ │ ├── SourceMap.js
│ │ │ ├── low_level_tests.js
│ │ │ └── writer.js
│ │ ├── es6
│ │ │ ├── codegeneration
│ │ │ │ └── PlaceholderParser.js
│ │ │ ├── semantics
│ │ │ │ └── FreeVariableChecker.js
│ │ │ └── tools
│ │ │ │ └── SourceMapMapping.js
│ │ ├── node
│ │ │ ├── api.js
│ │ │ ├── generated-code-dependencies.js
│ │ │ ├── require.js
│ │ │ ├── resources
│ │ │ │ ├── class.js
│ │ │ │ ├── compile-dir
│ │ │ │ │ ├── dep.js
│ │ │ │ │ └── file.js
│ │ │ │ ├── export-default-class.js
│ │ │ │ ├── export-default.js
│ │ │ │ ├── generator.js
│ │ │ │ ├── iAmScript.js
│ │ │ │ ├── iAmScriptAlso.es
│ │ │ │ ├── import-another-x.js
│ │ │ │ ├── import-export.js
│ │ │ │ ├── import-x.js
│ │ │ │ ├── only-export.js
│ │ │ │ ├── reexport-x.js
│ │ │ │ └── x.js
│ │ │ └── tree-writer.js
│ │ ├── runtime
│ │ │ ├── Loader.js
│ │ │ ├── System.js
│ │ │ ├── side-effect.js
│ │ │ ├── subdir
│ │ │ │ ├── test_d.js
│ │ │ │ └── test_e.js
│ │ │ ├── test_a.js
│ │ │ ├── test_b.js
│ │ │ ├── test_c.js
│ │ │ ├── test_interpret.js
│ │ │ ├── test_module.js
│ │ │ ├── test_script.js
│ │ │ ├── test_source_map_module.js
│ │ │ ├── throwsError.js
│ │ │ ├── throwsError.output
│ │ │ └── traceur-runtime.js
│ │ ├── semantics
│ │ │ └── VariableBinder.js
│ │ ├── syntax
│ │ │ ├── LineNumbers.js
│ │ │ ├── ParseTreeValidator.js
│ │ │ ├── Token.js
│ │ │ └── parser.js
│ │ ├── system
│ │ │ └── Hello.js
│ │ └── util
│ │ │ ├── ErrorReporter.js
│ │ │ ├── getopt.js
│ │ │ └── url.js
│ └── wiki
│ │ ├── .gitignore
│ │ └── CompilingOffline
│ │ ├── UsingCompiledFiles.html
│ │ └── greeter.js
│ ├── third_party
│ ├── README
│ └── codemirror-3.22
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── addon
│ │ ├── comment
│ │ │ ├── comment.js
│ │ │ └── continuecomment.js
│ │ ├── dialog
│ │ │ ├── dialog.css
│ │ │ └── dialog.js
│ │ ├── display
│ │ │ ├── fullscreen.css
│ │ │ ├── fullscreen.js
│ │ │ ├── placeholder.js
│ │ │ └── rulers.js
│ │ ├── edit
│ │ │ ├── closebrackets.js
│ │ │ ├── closetag.js
│ │ │ ├── continuelist.js
│ │ │ ├── matchbrackets.js
│ │ │ ├── matchtags.js
│ │ │ └── trailingspace.js
│ │ ├── fold
│ │ │ ├── brace-fold.js
│ │ │ ├── comment-fold.js
│ │ │ ├── foldcode.js
│ │ │ ├── foldgutter.css
│ │ │ ├── foldgutter.js
│ │ │ ├── indent-fold.js
│ │ │ ├── markdown-fold.js
│ │ │ └── xml-fold.js
│ │ ├── hint
│ │ │ ├── anyword-hint.js
│ │ │ ├── css-hint.js
│ │ │ ├── html-hint.js
│ │ │ ├── javascript-hint.js
│ │ │ ├── pig-hint.js
│ │ │ ├── python-hint.js
│ │ │ ├── show-hint.css
│ │ │ ├── show-hint.js
│ │ │ ├── sql-hint.js
│ │ │ └── xml-hint.js
│ │ ├── lint
│ │ │ ├── coffeescript-lint.js
│ │ │ ├── css-lint.js
│ │ │ ├── javascript-lint.js
│ │ │ ├── json-lint.js
│ │ │ ├── lint.css
│ │ │ ├── lint.js
│ │ │ └── yaml-lint.js
│ │ ├── merge
│ │ │ ├── dep
│ │ │ │ └── diff_match_patch.js
│ │ │ ├── merge.css
│ │ │ └── merge.js
│ │ ├── mode
│ │ │ ├── loadmode.js
│ │ │ ├── multiplex.js
│ │ │ ├── multiplex_test.js
│ │ │ └── overlay.js
│ │ ├── runmode
│ │ │ ├── colorize.js
│ │ │ ├── runmode-standalone.js
│ │ │ ├── runmode.js
│ │ │ └── runmode.node.js
│ │ ├── scroll
│ │ │ └── scrollpastend.js
│ │ ├── search
│ │ │ ├── match-highlighter.js
│ │ │ ├── search.js
│ │ │ └── searchcursor.js
│ │ ├── selection
│ │ │ ├── active-line.js
│ │ │ └── mark-selection.js
│ │ ├── tern
│ │ │ ├── tern.css
│ │ │ ├── tern.js
│ │ │ └── worker.js
│ │ └── wrap
│ │ │ └── hardwrap.js
│ │ ├── bin
│ │ ├── authors.sh
│ │ ├── compress
│ │ ├── lint
│ │ ├── release
│ │ └── source-highlight
│ │ ├── bower.json
│ │ ├── demo
│ │ ├── activeline.html
│ │ ├── anywordhint.html
│ │ ├── bidi.html
│ │ ├── btree.html
│ │ ├── buffers.html
│ │ ├── changemode.html
│ │ ├── closebrackets.html
│ │ ├── closetag.html
│ │ ├── complete.html
│ │ ├── emacs.html
│ │ ├── folding.html
│ │ ├── fullscreen.html
│ │ ├── hardwrap.html
│ │ ├── html5complete.html
│ │ ├── indentwrap.html
│ │ ├── lint.html
│ │ ├── loadmode.html
│ │ ├── marker.html
│ │ ├── markselection.html
│ │ ├── matchhighlighter.html
│ │ ├── matchtags.html
│ │ ├── merge.html
│ │ ├── multiplex.html
│ │ ├── mustache.html
│ │ ├── placeholder.html
│ │ ├── preview.html
│ │ ├── resize.html
│ │ ├── rulers.html
│ │ ├── runmode.html
│ │ ├── search.html
│ │ ├── spanaffectswrapping_shim.html
│ │ ├── tern.html
│ │ ├── theme.html
│ │ ├── trailingspace.html
│ │ ├── variableheight.html
│ │ ├── vim.html
│ │ ├── visibletabs.html
│ │ ├── widget.html
│ │ └── xmlcomplete.html
│ │ ├── doc
│ │ ├── activebookmark.js
│ │ ├── compress.html
│ │ ├── docs.css
│ │ ├── internals.html
│ │ ├── logo.png
│ │ ├── logo.svg
│ │ ├── manual.html
│ │ ├── realworld.html
│ │ ├── releases.html
│ │ ├── reporting.html
│ │ ├── upgrade_v2.2.html
│ │ └── upgrade_v3.html
│ │ ├── index.html
│ │ ├── keymap
│ │ ├── emacs.js
│ │ ├── extra.js
│ │ └── vim.js
│ │ ├── lib
│ │ ├── codemirror.css
│ │ └── codemirror.js
│ │ ├── mode
│ │ ├── apl
│ │ │ ├── apl.js
│ │ │ └── index.html
│ │ ├── asterisk
│ │ │ ├── asterisk.js
│ │ │ └── index.html
│ │ ├── clike
│ │ │ ├── clike.js
│ │ │ ├── index.html
│ │ │ └── scala.html
│ │ ├── clojure
│ │ │ ├── clojure.js
│ │ │ └── index.html
│ │ ├── cobol
│ │ │ ├── cobol.js
│ │ │ └── index.html
│ │ ├── coffeescript
│ │ │ ├── coffeescript.js
│ │ │ └── index.html
│ │ ├── commonlisp
│ │ │ ├── commonlisp.js
│ │ │ └── index.html
│ │ ├── css
│ │ │ ├── css.js
│ │ │ ├── index.html
│ │ │ ├── less.html
│ │ │ ├── less_test.js
│ │ │ ├── scss.html
│ │ │ ├── scss_test.js
│ │ │ └── test.js
│ │ ├── d
│ │ │ ├── d.js
│ │ │ └── index.html
│ │ ├── diff
│ │ │ ├── diff.js
│ │ │ └── index.html
│ │ ├── dtd
│ │ │ ├── dtd.js
│ │ │ └── index.html
│ │ ├── ecl
│ │ │ ├── ecl.js
│ │ │ └── index.html
│ │ ├── eiffel
│ │ │ ├── eiffel.js
│ │ │ └── index.html
│ │ ├── erlang
│ │ │ ├── erlang.js
│ │ │ └── index.html
│ │ ├── fortran
│ │ │ ├── fortran.js
│ │ │ └── index.html
│ │ ├── gas
│ │ │ ├── gas.js
│ │ │ └── index.html
│ │ ├── gfm
│ │ │ ├── gfm.js
│ │ │ ├── index.html
│ │ │ └── test.js
│ │ ├── gherkin
│ │ │ ├── gherkin.js
│ │ │ └── index.html
│ │ ├── go
│ │ │ ├── go.js
│ │ │ └── index.html
│ │ ├── groovy
│ │ │ ├── groovy.js
│ │ │ └── index.html
│ │ ├── haml
│ │ │ ├── haml.js
│ │ │ ├── index.html
│ │ │ └── test.js
│ │ ├── haskell
│ │ │ ├── haskell.js
│ │ │ └── index.html
│ │ ├── haxe
│ │ │ ├── haxe.js
│ │ │ └── index.html
│ │ ├── htmlembedded
│ │ │ ├── htmlembedded.js
│ │ │ └── index.html
│ │ ├── htmlmixed
│ │ │ ├── htmlmixed.js
│ │ │ └── index.html
│ │ ├── http
│ │ │ ├── http.js
│ │ │ └── index.html
│ │ ├── index.html
│ │ ├── jade
│ │ │ ├── index.html
│ │ │ └── jade.js
│ │ ├── javascript
│ │ │ ├── index.html
│ │ │ ├── javascript.js
│ │ │ ├── json-ld.html
│ │ │ ├── test.js
│ │ │ └── typescript.html
│ │ ├── jinja2
│ │ │ ├── index.html
│ │ │ └── jinja2.js
│ │ ├── julia
│ │ │ ├── index.html
│ │ │ └── julia.js
│ │ ├── less
│ │ │ ├── index.html
│ │ │ └── less.js
│ │ ├── livescript
│ │ │ ├── index.html
│ │ │ ├── livescript.js
│ │ │ └── livescript.ls
│ │ ├── lua
│ │ │ ├── index.html
│ │ │ └── lua.js
│ │ ├── markdown
│ │ │ ├── index.html
│ │ │ ├── markdown.js
│ │ │ └── test.js
│ │ ├── meta.js
│ │ ├── mirc
│ │ │ ├── index.html
│ │ │ └── mirc.js
│ │ ├── mllike
│ │ │ ├── index.html
│ │ │ └── mllike.js
│ │ ├── nginx
│ │ │ ├── index.html
│ │ │ └── nginx.js
│ │ ├── ntriples
│ │ │ ├── index.html
│ │ │ └── ntriples.js
│ │ ├── octave
│ │ │ ├── index.html
│ │ │ └── octave.js
│ │ ├── pascal
│ │ │ ├── index.html
│ │ │ └── pascal.js
│ │ ├── pegjs
│ │ │ ├── index.html
│ │ │ └── pegjs.js
│ │ ├── perl
│ │ │ ├── index.html
│ │ │ └── perl.js
│ │ ├── php
│ │ │ ├── index.html
│ │ │ └── php.js
│ │ ├── pig
│ │ │ ├── index.html
│ │ │ └── pig.js
│ │ ├── properties
│ │ │ ├── index.html
│ │ │ └── properties.js
│ │ ├── puppet
│ │ │ ├── index.html
│ │ │ └── puppet.js
│ │ ├── python
│ │ │ ├── index.html
│ │ │ └── python.js
│ │ ├── q
│ │ │ ├── index.html
│ │ │ └── q.js
│ │ ├── r
│ │ │ ├── index.html
│ │ │ └── r.js
│ │ ├── rpm
│ │ │ ├── changes
│ │ │ │ ├── changes.js
│ │ │ │ └── index.html
│ │ │ └── spec
│ │ │ │ ├── index.html
│ │ │ │ ├── spec.css
│ │ │ │ └── spec.js
│ │ ├── rst
│ │ │ ├── index.html
│ │ │ └── rst.js
│ │ ├── ruby
│ │ │ ├── index.html
│ │ │ ├── ruby.js
│ │ │ └── test.js
│ │ ├── rust
│ │ │ ├── index.html
│ │ │ └── rust.js
│ │ ├── sass
│ │ │ ├── index.html
│ │ │ └── sass.js
│ │ ├── scheme
│ │ │ ├── index.html
│ │ │ └── scheme.js
│ │ ├── shell
│ │ │ ├── index.html
│ │ │ └── shell.js
│ │ ├── sieve
│ │ │ ├── index.html
│ │ │ └── sieve.js
│ │ ├── smalltalk
│ │ │ ├── index.html
│ │ │ └── smalltalk.js
│ │ ├── smarty
│ │ │ ├── index.html
│ │ │ └── smarty.js
│ │ ├── smartymixed
│ │ │ ├── index.html
│ │ │ └── smartymixed.js
│ │ ├── solr
│ │ │ ├── index.html
│ │ │ └── solr.js
│ │ ├── sparql
│ │ │ ├── index.html
│ │ │ └── sparql.js
│ │ ├── sql
│ │ │ ├── index.html
│ │ │ └── sql.js
│ │ ├── stex
│ │ │ ├── index.html
│ │ │ ├── stex.js
│ │ │ └── test.js
│ │ ├── tcl
│ │ │ ├── index.html
│ │ │ └── tcl.js
│ │ ├── tiddlywiki
│ │ │ ├── index.html
│ │ │ ├── tiddlywiki.css
│ │ │ └── tiddlywiki.js
│ │ ├── tiki
│ │ │ ├── index.html
│ │ │ ├── tiki.css
│ │ │ └── tiki.js
│ │ ├── toml
│ │ │ ├── index.html
│ │ │ └── toml.js
│ │ ├── turtle
│ │ │ ├── index.html
│ │ │ └── turtle.js
│ │ ├── vb
│ │ │ ├── index.html
│ │ │ └── vb.js
│ │ ├── vbscript
│ │ │ ├── index.html
│ │ │ └── vbscript.js
│ │ ├── velocity
│ │ │ ├── index.html
│ │ │ └── velocity.js
│ │ ├── verilog
│ │ │ ├── index.html
│ │ │ └── verilog.js
│ │ ├── xml
│ │ │ ├── index.html
│ │ │ └── xml.js
│ │ ├── xquery
│ │ │ ├── index.html
│ │ │ ├── test.js
│ │ │ └── xquery.js
│ │ ├── yaml
│ │ │ ├── index.html
│ │ │ └── yaml.js
│ │ └── z80
│ │ │ ├── index.html
│ │ │ └── z80.js
│ │ ├── package.json
│ │ ├── test
│ │ ├── comment_test.js
│ │ ├── doc_test.js
│ │ ├── driver.js
│ │ ├── emacs_test.js
│ │ ├── index.html
│ │ ├── lint
│ │ │ ├── acorn.js
│ │ │ ├── lint.js
│ │ │ └── walk.js
│ │ ├── mode_test.css
│ │ ├── mode_test.js
│ │ ├── phantom_driver.js
│ │ ├── run.js
│ │ ├── search_test.js
│ │ ├── test.js
│ │ └── vim_test.js
│ │ └── theme
│ │ ├── 3024-day.css
│ │ ├── 3024-night.css
│ │ ├── ambiance-mobile.css
│ │ ├── ambiance.css
│ │ ├── base16-dark.css
│ │ ├── base16-light.css
│ │ ├── blackboard.css
│ │ ├── cobalt.css
│ │ ├── eclipse.css
│ │ ├── elegant.css
│ │ ├── erlang-dark.css
│ │ ├── lesser-dark.css
│ │ ├── mbo.css
│ │ ├── mdn-like.css
│ │ ├── midnight.css
│ │ ├── monokai.css
│ │ ├── neat.css
│ │ ├── night.css
│ │ ├── paraiso-dark.css
│ │ ├── paraiso-light.css
│ │ ├── pastel-on-dark.css
│ │ ├── rubyblue.css
│ │ ├── solarized.css
│ │ ├── the-matrix.css
│ │ ├── tomorrow-night-eighties.css
│ │ ├── twilight.css
│ │ ├── vibrant-ink.css
│ │ ├── xq-dark.css
│ │ └── xq-light.css
│ ├── traceur
│ └── traceur-build
└── tools
└── ChromeJavaScriptBuiltIns.html
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | target/
3 | node_modules
4 | compiled/
5 | output/
6 | extension/third_party/harmony-reflect/
--------------------------------------------------------------------------------
/extension/Makefile:
--------------------------------------------------------------------------------
1 | RUNTIME_SRC = \
2 | ./third_party/traceur-compiler/src/runtime/runtime.js \
3 | ./third_party/traceur-compiler/src/runtime/url.js \
4 | ./third_party/traceur-compiler/src/runtime/ModuleStore.js
5 |
6 | all: compiled/traceFunctionsPreprocessor.js compiled/fakeMakerCompiler.js
7 |
8 | compiled/%: lib/%
9 | ./third_party/traceur-compiler/traceur --sourcemap --out $@ $(foreach src,$(RUNTIME_SRC),--script $(src)) $^
10 |
11 | clean:
12 | rm -f compiled/*
13 |
--------------------------------------------------------------------------------
/extension/Panel/FakeMakerPanel.css:
--------------------------------------------------------------------------------
1 | /* Google BSD license http://code.google.com/google_bsd_license.html
2 | * Copyright 2013 Google Inc. johnjbarton@google.com
3 | */
4 | html, body {
5 | height: 100%;
6 | }
7 |
8 | body {
9 | margin: 0;
10 | }
11 |
12 | polymer-ui-sidebar-menu {
13 | width: 240px;
14 | height: 100%;
15 | }
16 |
--------------------------------------------------------------------------------
/extension/Panel/FakeMakerPanel.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2013 Google Inc. johnjbarton@google.com
3 |
4 | (function(){
5 | function FakeMakerPanelSidebar() {
6 | this.selectIds();
7 | this.connect();
8 | }
9 |
10 | FakeMakerPanelSidebar.prototype = {
11 | selectIds: function() {
12 | this._sidebar = document.querySelector('#FakeMakerPanelSidebar');
13 | this._playButton = this._sidebar.querySelector('#play');
14 | this._exportButton = this._sidebar.querySelector('#export');
15 | },
16 | connect: function() {
17 |
18 | }
19 | };
20 |
21 | function onLoad() {
22 | new FakeMakerPanelSidebar();
23 | }
24 |
25 | window.addEventListener('load', onLoad);
26 | })();
27 |
--------------------------------------------------------------------------------
/extension/Panel/doors.css:
--------------------------------------------------------------------------------
1 | /*
2 | // Google BSD license http://code.google.com/google_bsd_license.html
3 | // Copyright 2014 Google Inc. johnjbarton@google.com
4 | */
5 | html {
6 | height: 100%;
7 | }
8 | /* apply a natural box layout model to all elements */
9 | * {
10 | box-sizing: border-box;
11 | }
12 | body {
13 | margin: 0px;
14 | overflow: hidden; /* no scroll bar so we control */
15 | -webkit-box-sizing: border-box; /* measure width & height w/o padding & border */
16 | box-sizing: border-box;
17 | height: 100%;
18 | }
19 | .doors {
20 | height: 100%;
21 | }
22 | .CodeMirror {
23 | /* Set height, width, borders, and global font properties here */
24 | font-family: monospace;
25 | height: 100%;
26 | }
--------------------------------------------------------------------------------
/extension/Panel/doors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/extension/Panel/doors.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2014 Google Inc. johnjbarton@google.com
3 |
4 | var doors = document.querySelector('.doors');
5 |
6 | var initialContent = "function p() {\n}\n";
7 |
8 | var editor = CodeMirror(doors, {
9 | value: initialContent,
10 | mode: "javascript",
11 | lineNumbers: true,
12 | });
13 |
14 | // API
15 |
16 | function updateTrace(trace) {
17 | editor.setValue(trace);
18 | }
19 |
--------------------------------------------------------------------------------
/extension/README.md:
--------------------------------------------------------------------------------
1 | See README.md on github: https://github.com/google/FakeMaker/edit/master/README.md
--------------------------------------------------------------------------------
/extension/TraceSaveButton.css:
--------------------------------------------------------------------------------
1 | /* Google BSD license http://code.google.com/google_bsd_license.html
2 | * Copyright 2014 Google Inc. johnjbarton@google.com
3 | */
4 |
5 | .remove {
6 | display: none;
7 | }
8 | .save {
9 | display: inline;
10 | }
11 | .saved {
12 | color: silver;
13 | }
14 | .trace-saved .saved {
15 | color: black;
16 | }
17 | .save {
18 | color: silver;
19 | }
20 | .trace-active .save {
21 | color: black;
22 | }
23 | .trace-saved .save {
24 | color: silver;
25 | }
26 |
--------------------------------------------------------------------------------
/extension/lib/applyFakeMaker.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2013 Google Inc. johnjbarton@google.com
3 |
4 | function applyFakeMaker() {
5 | var fakeMaker = new FakeMaker();
6 | window.windowProxy = fakeMaker.makeFakeWindow();
7 | window.__fakeMaker = fakeMaker;
8 | }
--------------------------------------------------------------------------------
/extension/lib/applyFakePlayer.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2014 Google Inc. johnjbarton@google.com
3 |
4 | function applyFakePlayer() {
5 | var fakePlayer = new FakePlayer(window.__fakeMakerRecord);
6 | window.windowProxy = fakePlayer.startingObject();
7 | fakePlayer.initialize();
8 | }
--------------------------------------------------------------------------------
/extension/lib/dummyDefine.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2014 Google Inc. johnjbarton@google.com
3 |
4 | function define(fnc) {
5 | fnc(null, window, null);
6 | }
7 |
--------------------------------------------------------------------------------
/extension/lib/fakeMakerCompiler-import.js:
--------------------------------------------------------------------------------
1 | // Google BSD license http://code.google.com/google_bsd_license.html
2 | // Copyright 2013 Google Inc. johnjbarton@google.com
3 |
4 | module fakeMakerCompiler from './fakeMakerCompiler';
--------------------------------------------------------------------------------
/extension/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "FakeMaker",
3 | "version": "0.1",
4 | "manifest_version": 2,
5 | "minimum_chrome_version": "22",
6 | "description": "Creates a 'fake' for JS global window object reproducing load state",
7 | "devtools_page": "FakeMakerDevtoolsPage.html",
8 | "permissions" :
9 | [
10 | "debugger",
11 | ""
12 | ],
13 | "web_accessible_resources":
14 | [
15 | "*"
16 | ],
17 | "content_security_policy": "default-src 'self' chrome-extension-resource: 'unsafe-eval'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; connect-src *; frame-src *;"
18 | }
--------------------------------------------------------------------------------
/extension/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "FakeMaker",
3 | "version": "0.0.1",
4 | "description": "Chrome devtool extn. to fake 'window' object for benchmarks",
5 | "main": "FakeMakerDevtoolsPage.js",
6 | "directories": {
7 | "test": "test"
8 | },
9 | "scripts": {
10 | "test": "echo \"Error: no test specified\" && exit 1"
11 | },
12 | "repository": "",
13 | "keywords": [
14 | "tools",
15 | "benchmarks",
16 | "javascript",
17 | "proxy"
18 | ],
19 | "author": "johnjbarton@google.com",
20 | "license": "BSD",
21 | "dependencies": {
22 | "source-map": "0.1.30",
23 | "codemirror": "~3.21.0",
24 | "express": "3.x",
25 | "formidable": "1.0.14"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/extension/test/testCurrentScript.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/extension/test/testIframeLoader.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/extension/test/testTraceDecoder.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/extension/test/unitTest.css:
--------------------------------------------------------------------------------
1 | body {
2 | cursor: default;
3 | }
4 | .pass {
5 | color: green;
6 | }
7 | .fail {
8 | color: red;
9 | }
--------------------------------------------------------------------------------
/extension/third_party/DevtoolsExtended/RuntimeStatusButton.css:
--------------------------------------------------------------------------------
1 | /* Google BSD license http://code.google.com/google_bsd_license.html
2 | * Copyright 2014 Google Inc. johnjbarton@google.com
3 | */
4 |
5 | .remove {
6 | display: none;
7 | }
8 | .install {
9 | display: inline;
10 | }
11 | .runtimeInstalled .remove {
12 | display: inline;
13 | }
14 | .runtimeInstalled .install {
15 | display: none;
16 | }
17 |
18 | .installed {
19 | color: silver;
20 | }
21 | .runtimeInstalled .installed {
22 | color: black;
23 | }
24 |
--------------------------------------------------------------------------------
/extension/third_party/DevtoolsExtended/RuntimeStatusPage.html:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | Installed
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/.npmignore:
--------------------------------------------------------------------------------
1 | *
2 | !src/node/*.js
3 | !bin/traceur.js
4 | !bin/traceur-runtime.js
5 | !traceur
6 | !demo
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.10
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/build/parse-tree-visitor.header:
--------------------------------------------------------------------------------
1 |
2 | export class ParseTreeVisitor {
3 | visitAny(tree) {
4 | tree && tree.visit(this);
5 | }
6 | visit(tree) {
7 | this.visitAny(tree);
8 | }
9 | visitList(list) {
10 | if (list) {
11 | for (var i = 0; i < list.length; i++) {
12 | this.visitAny(list[i]);
13 | }
14 | }
15 | }
16 | visitStateMachine(tree) {
17 | throw Error('State machines should not live outside of the GeneratorTransformer.');
18 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/codereview.settings:
--------------------------------------------------------------------------------
1 | # This file is used by gcl to get repository specific information.
2 | CODE_REVIEW_SERVER: https://codereview.appspot.com
3 | VIEW_VC: http://code.google.com/p/traceur-compiler/source/detail?r=
4 | CC_LIST: traceur-compiler-reviews@googlegroups.com
5 |
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/demo/async-read-file.js:
--------------------------------------------------------------------------------
1 | // Run this with
2 | //
3 | // traceur --experimental async-read-file.js file-to-read
4 |
5 | function lineCount(file) {
6 | var data;
7 | try {
8 | // TODO: make await an expression.
9 | await data = require('fs').readFile(file, 'utf8');
10 | console.log(`${file} has ${data.split('\n').length} lines`);
11 | } catch (ex) {
12 | console.error(ex);
13 | }
14 | }
15 |
16 | var fileName = process.argv[2];
17 | lineCount(fileName);
18 | console.log(`Loading ${fileName}...`);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/demo/expressServer.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var http = require('http');
3 |
4 | function servePathAtPort(path, port) {
5 | var app = express();
6 | app.use(express.static(path)); // before directory to allow index.html to work
7 | app.use(express.directory(path));
8 | var server = http.createServer(app);
9 | server.on('error', function(e) {
10 | console.log('Port ' + port + ' did not work out');
11 | });
12 | server.listen.apply(server, [port]);
13 | console.log('serving ' + path + ' at ' + port);
14 | }
15 |
16 | servePathAtPort(__dirname + '/..', 8099);
17 | servePathAtPort(__dirname + '/..', 80);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/logo/tc.ai:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/logo/tc.ai
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/logo/tc.eps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/logo/tc.eps
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/logo/tc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/logo/tc.jpg
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/logo/tc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/logo/tc.png
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/src/bootstrap.js:
--------------------------------------------------------------------------------
1 | // Copyright 2011 Traceur Authors.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | new traceur.WebPageTranscoder(document.location.href).run();
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/src/runtime/polyfill-import.js:
--------------------------------------------------------------------------------
1 | // Copyright 2013 Traceur Authors.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | import {} from './polyfills/polyfills';
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/BasicImport.js:
--------------------------------------------------------------------------------
1 | import {Foo} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', Foo);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/ImportEmptyImportClause.js:
--------------------------------------------------------------------------------
1 | // AMD executes the dependencies before executing the module.
2 | import {} from './deps/side-effect2';
3 | assert.equal(1, this.sideEffect);
4 | this.sideEffect = 0;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/ImportNoImportClause.js:
--------------------------------------------------------------------------------
1 | // AMD executes the dependencies before executing the module.
2 | import './deps/side-effect';
3 | assert.equal(1, this.sideEffect);
4 | this.sideEffect = 0;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/MultipleImports.js:
--------------------------------------------------------------------------------
1 | import {Foo, Bar, Baz} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', Foo);
4 | assert.equal('Bar from foo.js', Bar);
5 | assert.equal('Baz from foo.js', Baz);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/NamedExports.js:
--------------------------------------------------------------------------------
1 | export var someExport = 'val';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/NamedImports.js:
--------------------------------------------------------------------------------
1 | import {Foo as f, Bar as b, Baz} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', f);
4 | assert.equal('Bar from foo.js', b);
5 | assert.equal('Baz from foo.js', Baz);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/NestedImport.js:
--------------------------------------------------------------------------------
1 | import {Bar} from './deps/bar';
2 |
3 | assert.equal('Bar from bar.js', Bar);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/deps/bar.js:
--------------------------------------------------------------------------------
1 | import {Foo} from './foo';
2 |
3 | export var Bar = 'Bar from bar.js';
4 |
5 | assert.equal('Foo from foo.js', Foo);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/deps/foo.js:
--------------------------------------------------------------------------------
1 | export var Foo = 'Foo from foo.js';
2 | export var Bar = 'Bar from foo.js';
3 | export var Baz = 'Baz from foo.js';
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/deps/side-effect.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/amd/deps/side-effect2.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/BasicImport.js:
--------------------------------------------------------------------------------
1 | import {Foo} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', Foo);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/ImportEmptyImportClause.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 | import {} from './deps/side-effect2';
3 | assert.equal(2, this.sideEffect);
4 | this.sideEffect = 1;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/ImportNoImportClause.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 | import './deps/side-effect';
3 | assert.equal(2, this.sideEffect);
4 | this.sideEffect = 1;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/MultipleImports.js:
--------------------------------------------------------------------------------
1 | import {Foo, Bar, Baz} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', Foo);
4 | assert.equal('Bar from foo.js', Bar);
5 | assert.equal('Baz from foo.js', Baz);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/NamedImports.js:
--------------------------------------------------------------------------------
1 | import {Foo as f, Bar as b, Baz} from './deps/foo';
2 |
3 | assert.equal('Foo from foo.js', f);
4 | assert.equal('Bar from foo.js', b);
5 | assert.equal('Baz from foo.js', Baz);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/NestedImport.js:
--------------------------------------------------------------------------------
1 | import {Bar} from './deps/bar';
2 |
3 | assert.equal('Bar from bar.js', Bar);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/deps/bar.js:
--------------------------------------------------------------------------------
1 | import {Foo} from './foo';
2 |
3 | export var Bar = 'Bar from bar.js';
4 |
5 | assert.equal('Foo from foo.js', Foo);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/deps/foo.js:
--------------------------------------------------------------------------------
1 | export var Foo = 'Foo from foo.js';
2 | export var Bar = 'Bar from foo.js';
3 | export var Baz = 'Baz from foo.js';
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/deps/side-effect.js:
--------------------------------------------------------------------------------
1 | this.sideEffect++;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/commonjs/deps/side-effect2.js:
--------------------------------------------------------------------------------
1 | this.sideEffect++;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/AnnotatedFunctionTypedParam.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | X
5 | } from './resources/setup';
6 |
7 | @Anno
8 | function AnnotatedFnMultiParam(x:X, y) {}
9 |
10 | assertArrayEquals([[X], []], AnnotatedFnMultiParam.parameters);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/AnnotatedTypedClass.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | Anno2,
5 | X
6 | } from './resources/setup';
7 |
8 | @Anno('class')
9 | class AnnotatedTypedClass {
10 | @Anno2('ctor')
11 | constructor(@Anno a:X, @Anno('b') b) {
12 | this.foo = a;
13 | }
14 |
15 | bar(a:X) {}
16 | }
17 |
18 | assertArrayEquals([new Anno('class'), new Anno2('ctor')], AnnotatedTypedClass.annotations);
19 | assertArrayEquals([[X, new Anno], [new Anno('b')]], AnnotatedTypedClass.parameters);
20 | assertArrayEquals([[X]], AnnotatedTypedClass.prototype.bar.parameters);
21 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/AnnotatedTypedParam.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | X
5 | } from './resources/setup';
6 |
7 | function AnnotatedTypedParam(@Anno x:X) {}
8 |
9 | assertArrayEquals([[X, new Anno]], AnnotatedTypedParam.parameters);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/Class.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | @Anno
5 | class AnnotatedClass {
6 | @Anno
7 | annotatedMethod() {}
8 |
9 | @Anno
10 | get prop() { return 'getter'; }
11 |
12 | @Anno
13 | set prop(x) {}
14 | }
15 |
16 | assertArrayEquals([new Anno], AnnotatedClass.annotations);
17 | assertArrayEquals([new Anno],
18 | AnnotatedClass.prototype.annotatedMethod.annotations);
19 |
20 | assertArrayEquals([new Anno],
21 | Object.getOwnPropertyDescriptor(AnnotatedClass.prototype, 'prop').
22 | get.annotations);
23 |
24 | assertArrayEquals([new Anno],
25 | Object.getOwnPropertyDescriptor(AnnotatedClass.prototype, 'prop').
26 | set.annotations);
27 |
28 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ClassConstructor.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {
3 | Anno,
4 | Anno2
5 | } from './resources/setup';
6 |
7 | @Anno
8 | class AnnotatedClassCtor {
9 | @Anno2
10 | constructor() {}
11 | }
12 |
13 | assertArrayEquals([new Anno, new Anno2], AnnotatedClassCtor.annotations);
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ClassGeneratorMethod.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {
3 | Anno,
4 | Anno2
5 | } from './resources/setup';
6 |
7 | class AnnotatedClass {
8 | @Anno
9 | *generate() {}
10 |
11 | @Anno2
12 | static *staticGenerate() {}
13 | }
14 |
15 | assertArrayEquals([new Anno],
16 | AnnotatedClass.prototype.generate.annotations);
17 | assertArrayEquals([new Anno2],
18 | AnnotatedClass.staticGenerate.annotations);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ClassInsideObjectGetter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | var object = {
5 | get foo() {
6 | class Foo {
7 | @Anno
8 | get b() {}
9 | }
10 | return Foo;
11 | }
12 | };
13 |
14 | assertArrayEquals([new Anno],
15 | Object.getOwnPropertyDescriptor(object.foo.prototype, 'b').get.annotations);
16 |
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/Constructor.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class AnnotatedCtor {
5 | @Anno2
6 | constructor() {}
7 | }
8 |
9 | assertArrayEquals([new Anno2], AnnotatedCtor.annotations);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ConstructorParam.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class CtorParam {
5 | constructor(@Anno x) {}
6 | }
7 |
8 | assertArrayEquals([[new Anno]], CtorParam.parameters);
9 |
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/Error_annotated_var.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --annotations
3 | // Error: :9:1: Unsupported annotated expression
4 | import {Anno} from './resources/setup';
5 |
6 | @Anno
7 | var test = 1;
8 |
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ExportedClass.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 | import DefaultExportedAnnotatedClass from './resources/exported-default-class';
4 | import {
5 | ExportedAnnotatedClass,
6 | ExportedUnannotatedClass
7 | } from './resources/exported-classes';
8 |
9 |
10 | assertArrayEquals([new Anno], ExportedAnnotatedClass.annotations);
11 | assertArrayEquals([new Anno],
12 | ExportedAnnotatedClass.prototype.annotatedMethod.annotations);
13 |
14 | assertArrayEquals([new Anno],
15 | ExportedUnannotatedClass.prototype.annotatedMethod.annotations);
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/ExportedFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 | import defaultExportedFunction from './resources/exported-default-function';
4 |
5 | import {
6 | exportedAnnotated,
7 | exportedUnannotated
8 | } from './resources/exported-functions';
9 |
10 | assertArrayEquals([new Anno], exportedAnnotated.annotations);
11 | assertArrayEquals([[new Anno]], exportedAnnotated.parameters);
12 | assert.isUndefined(exportedUnannotated.annotations);
13 | assertArrayEquals([[new Anno]], exportedUnannotated.parameters);
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/FunctionInsideClassGetter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | @Anno('Test')
5 | class Test {
6 | get annotatedFn() {
7 | @Anno('x')
8 | function x() {}
9 | return x;
10 | }
11 | }
12 |
13 | assertArrayEquals([new Anno('Test')], Test.annotations);
14 | assertArrayEquals([new Anno('x')], new Test().annotatedFn.annotations);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/FunctionMultipleAnnotatedParameter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {
3 | Anno,
4 | Anno2
5 | } from './resources/setup';
6 |
7 | function MultipleAnnotations(@Anno('x') @Anno2('x') x) {}
8 |
9 | assertArrayEquals([[new Anno('x'), new Anno2('x')]],
10 | MultipleAnnotations.parameters);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/FunctionMultipleParameters.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | function MultipleParams(@Anno('x') x, @Anno('y') y) {}
5 |
6 | assertArrayEquals([[new Anno('x')], [new Anno('y')]],
7 | MultipleParams.parameters);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/FunctionParameter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | function AnnotatedParam(@Anno('x') x) {}
5 |
6 | assertArrayEquals([[new Anno('x')]], AnnotatedParam.parameters);
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/GeneratorFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | @Anno
5 | function* generate() {}
6 |
7 | assertArrayEquals([new Anno], generate.annotations);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/GetAccessorStringName.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class C {
5 | @Anno('x y z')
6 | get "x y z"() { return 1; }
7 | @Anno('xyz')
8 | get xyz() { return 1; }
9 | }
10 |
11 | assertArrayEquals([new Anno('x y z')],
12 | Object.getOwnPropertyDescriptor(C.prototype, 'x y z').get.annotations);
13 | assertArrayEquals([new Anno('xyz')],
14 | Object.getOwnPropertyDescriptor(C.prototype, 'xyz').get.annotations);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/MethodParam.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class MethodParam {
5 | method(@Anno x) {}
6 | }
7 |
8 | assertArrayEquals([[new Anno]], MethodParam.prototype.method.parameters);
9 |
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/MultipleAnnotatedFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {
3 | Anno,
4 | Anno2
5 | } from './resources/setup';
6 |
7 | @Anno
8 | @Anno2('val')
9 | function Multi() {}
10 |
11 | assertArrayEquals([new Anno, new Anno2('val')], Multi.annotations);
12 |
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/MultipleParameterTypes.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | X
5 | } from './resources/setup';
6 |
7 | function MultiParamWithAnnotation(@Anno x:X, y) {}
8 | function MultiTypedParamsNoAnnotations(x:X, y:X) {}
9 |
10 | assertArrayEquals([[X, new Anno], []], MultiParamWithAnnotation.parameters);
11 | assertArrayEquals([[X], [X]], MultiTypedParamsNoAnnotations.parameters);
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/NestedFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | X
5 | } from './resources/setup';
6 |
7 | function f(a = function() {
8 | // body of default param expression
9 | function g(@Anno x : X) {}
10 | return g;
11 | }) {
12 | return a();
13 | }
14 |
15 | var nested = f();
16 | assertArrayEquals([[X, new Anno]], nested.parameters);
17 |
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/PropertyMethodStringName.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class C {
5 | @Anno('x y z')
6 | "x y z"() { return 1; }
7 | @Anno('xyz')
8 | xyz() { return 1; }
9 | }
10 |
11 | assertArrayEquals([new Anno('x y z')], C.prototype['x y z'].annotations);
12 | assertArrayEquals([new Anno('xyz')], C.prototype.xyz.annotations);
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/SetterParam.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class SetterParam {
5 | set prop(@Anno x) {}
6 | }
7 |
8 | assertArrayEquals([[new Anno]],
9 | Object.getOwnPropertyDescriptor(SetterParam.prototype, 'prop').
10 | set.parameters);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/SimpleFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | @Anno
5 | function Simple() {}
6 |
7 | assertArrayEquals([new Anno], Simple.annotations);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/StaticGetter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class StaticGetter {
5 | @Anno
6 | static get prop() { return 'getter'; }
7 | }
8 |
9 | assertArrayEquals([new Anno],
10 | Object.getOwnPropertyDescriptor(StaticGetter, 'prop').get.annotations);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/StaticMethod.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class StaticMethod {
5 | @Anno
6 | static method(@Anno x) {}
7 | }
8 |
9 | assertArrayEquals([new Anno], StaticMethod.method.annotations);
10 | assertArrayEquals([[new Anno]], StaticMethod.method.parameters);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/StaticSetter.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations
2 | import {Anno} from './resources/setup';
3 |
4 | class StaticSetter {
5 | @Anno
6 | static set prop(@Anno x) {}
7 | }
8 |
9 | assertArrayEquals([new Anno],
10 | Object.getOwnPropertyDescriptor(StaticSetter, 'prop').set.annotations);
11 | assertArrayEquals([[new Anno]],
12 | Object.getOwnPropertyDescriptor(StaticSetter, 'prop').set.parameters);
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/UnannotatedTypedClass.js:
--------------------------------------------------------------------------------
1 | // Options: --annotations --types
2 | import {
3 | Anno,
4 | X
5 | } from './resources/setup';
6 |
7 | class UnannotatedClass {
8 | constructor(a:X, b) {
9 | this.abc = a;
10 | }
11 |
12 | bar(a:X) {}
13 |
14 | set setter(a:X) {
15 | this.abc = a;
16 | }
17 | }
18 |
19 | assertArrayEquals([[X], []], UnannotatedClass.parameters);
20 | assertArrayEquals([[X]], UnannotatedClass.prototype.bar.parameters);
21 | assertArrayEquals([[X]],
22 | Object.getOwnPropertyDescriptor(UnannotatedClass.prototype, 'setter').
23 | set.parameters);
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/UnannotatedUntypedFunction.js:
--------------------------------------------------------------------------------
1 | function UnannotatedUntypedParams(x, y) {}
2 |
3 | assert(!UnannotatedUntypedParams.annotations);
4 | assert(!UnannotatedUntypedParams.parameters);
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/resources/exported-classes.js:
--------------------------------------------------------------------------------
1 | import {Anno} from './setup';
2 |
3 | @Anno
4 | export class ExportedAnnotatedClass {
5 | @Anno
6 | annotatedMethod() {}
7 | }
8 |
9 | export class ExportedUnannotatedClass {
10 | @Anno
11 | annotatedMethod() {}
12 | }
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/resources/exported-default-class.js:
--------------------------------------------------------------------------------
1 | import {Anno} from './setup';
2 |
3 | @Anno
4 | export default class {
5 | @Anno
6 | annotatedMethod() {}
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/resources/exported-default-function.js:
--------------------------------------------------------------------------------
1 | import {Anno} from './setup';
2 |
3 | @Anno
4 | export default function (@Anno x) {
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/resources/exported-functions.js:
--------------------------------------------------------------------------------
1 | import {Anno} from './setup';
2 |
3 | @Anno
4 | export function exportedAnnotated(@Anno x) {
5 | }
6 |
7 | export function exportedUnannotated(@Anno x) {
8 | }
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Annotations/resources/setup.js:
--------------------------------------------------------------------------------
1 | export function X() {}
2 | X.toJSON = function () { return 'function X'; }
3 |
4 | export function Anno(value) {
5 | this.annotation = true;
6 | this.value = value;
7 | }
8 |
9 | export function Anno2(value) {
10 | this.annotation2 = true;
11 | this.value = value;
12 | }
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrayComprehension/Closure.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 | // Block binding is needed to get the right scoping semantics inside the arrow
3 | // function in the comprehension.
4 |
5 | var res = [for (x of [0, 1]) for (y of [2, 3]) () => [x, y]];
6 |
7 | assert.equal(4, res.length);
8 | assertArrayEquals([0, 2], res[0]());
9 | assertArrayEquals([0, 3], res[1]());
10 | assertArrayEquals([1, 2], res[2]());
11 | assertArrayEquals([1, 3], res[3]());
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrayComprehension/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --array-comprehension=false
3 | // Error: :5:14: ']' expected
4 |
5 | var array = [for (x of [0, 1, 2, 3, 4]) x];
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrayComprehension/Error_NotDefined.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | var array = [for (notDefined of [0]) notDefined];
4 | notDefined;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrayIterator.js:
--------------------------------------------------------------------------------
1 | var a = ['a', 'b', 'c'];
2 |
3 | var res = [];
4 | for (var x of a) {
5 | res.push(x);
6 | }
7 | assert.deepEqual(res, ['a', 'b', 'c']);
8 |
9 | assert.equal(a[Symbol.iterator], a.values);
10 |
11 | res = [];
12 | for (var x of a.values()) {
13 | res.push(x);
14 | }
15 | assert.deepEqual(res, ['a', 'b', 'c']);
16 |
17 | res = [];
18 | for (var x of a.keys()) {
19 | res.push(x);
20 | }
21 | assert.deepEqual(res, [0, 1, 2]);
22 |
23 | res = [];
24 | for (var x of a.entries()) {
25 | res.push(x);
26 | }
27 | assert.deepEqual(res, [[0, 'a'], [1, 'b'], [2, 'c']]);
28 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/AlphaRename.js:
--------------------------------------------------------------------------------
1 | var global = this;
2 | var self = {};
3 |
4 | function outer() {
5 | var f = () => {
6 | assert.equal(this, self);
7 |
8 | var g = () => {
9 | assert.equal(this, self);
10 | };
11 | g();
12 |
13 | var h = function() {
14 | assert.equal(this, global);
15 | };
16 | h();
17 | };
18 |
19 | f();
20 | }
21 |
22 | outer.call(self);
23 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Arguments.js:
--------------------------------------------------------------------------------
1 | function f() {
2 | var args = (() => arguments)();
3 | assert.equal(args, arguments);
4 | }
5 |
6 | f();
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/CoverInitialiser.js:
--------------------------------------------------------------------------------
1 | // https://github.com/google/traceur-compiler/issues/478
2 |
3 | function f() {
4 | (1 ? ({a=0}) => {} : 1);
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_CoverInitialiser.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:16: Unexpected token '='
3 |
4 | function f() {
5 | ({a = (0, {a = 0})} = {})
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_CoverInitialiser2.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:5: Unexpected token '='
3 |
4 | ({a = 0});
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --arrow-functions=false
3 |
4 | var identity = (x) -> x;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_FreeVariableChecker.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | var identity = (identityParam) -> missingIdentifier;
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_InvalidFormalParameters.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:15: Unexpected token +
3 |
4 | var f = (a, b + 5) => a + b;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_Precedence.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:26: Semi-colon expected
3 |
4 | var identity = (x) => {x}.bind({});
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_Precedence2.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:11: Semi-colon expected
3 | // Error: :5:11: Unexpected token =>
4 |
5 | (x) + (y) => y;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_Precedence3.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:9: Semi-colon expected
3 | // Error: :5:9: Unexpected token =>
4 |
5 | (x) + y => y;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_SpreadNotLast.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :6:17: ')' expected
3 | // Error: :6:12: Unexpected token ...
4 |
5 | {
6 | let f = (...xs, x) => xs;
7 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Error_SpreadOutsideFormals.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:13: Unexpected token ...
3 |
4 | var f = (x, ...xs);
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/FreeVariableChecker.js:
--------------------------------------------------------------------------------
1 | var identity = (identityParam) => identityParam;
2 | assert.equal(1234, identity(1234));
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Skip_InitialiserShorthand.js:
--------------------------------------------------------------------------------
1 | // Skip. Not implemented.
2 |
3 | // TODO: needs the intialiser shorthand implemented for arrow functions
4 |
5 | // Object intialiser shorthand: "method" = function-valued property with dynamic ''this''
6 | const obj = {
7 | method() -> {
8 | return => this;
9 | }
10 | };
11 |
12 | assert(obj.method() === obj);
13 | assert(obj.method.call(u) === u);
14 |
15 | // Name binding forms hoist to body (var) or block (let, const) top
16 | var warmer(a) -> { return a; };
17 | let warm(b) -> { return b; };
18 | const colder(c) -> { return c; };
19 | const #coldest(d) -> {...};
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/Skip_SoftBind.js:
--------------------------------------------------------------------------------
1 | // Skip. Not implemented.
2 |
3 | // TODO: needs soft bind and ??= implemented
4 |
5 | // A special form based on the default operator proposal
6 | const self_default_bound = (this ??= self, a, b) -> {
7 | this.c = a * b;
8 | }
9 | self_default_bound(6, 7);
10 | assert(self.c === 42);
11 |
12 | self_default_bound.call(other, 8, 9);
13 | assert(other.c === 72);
14 | assert(self.c === 42);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ArrowFunctions/ThisBindings.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | // These tests are from:
4 | // http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax
5 |
6 | const obj = {
7 | method: function () {
8 | return () => this;
9 | }
10 | };
11 | assert.equal(obj.method()(), obj);
12 |
13 | let fake = {steal: obj.method()};
14 | assert.equal(fake.steal(), obj);
15 |
16 | let real = {borrow: obj.method};
17 | assert.equal(real.borrow()(), real);
18 |
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/AlphaRenaming.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncComplete(self, arg) {
5 | return new Promise((resolve) => {
6 | resolve([self, arg]);
7 | });
8 | }
9 |
10 | var self = {};
11 | var obj = {};
12 | var value;
13 |
14 | async function A() {
15 | assert.equal(this, self);
16 | var value = await asyncComplete(this, arguments[0]);
17 | assert.deepEqual([self, obj], value);
18 | done();
19 | }
20 |
21 | A.call(self, obj);
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/AsyncMethod.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncTimeout(ms) {
5 | return new Promise((resolve) => {
6 | setTimeout(resolve, ms);
7 | });
8 | }
9 |
10 | class C {
11 | async test() {
12 | var x = 0;
13 | await asyncTimeout(1);
14 | assert.equal(1, ++x);
15 | await asyncTimeout(1);
16 | assert.equal(2, ++x);
17 | C.test();
18 | }
19 |
20 | static async test() {
21 | var x = 0;
22 | await asyncTimeout(1);
23 | assert.equal(1, ++x);
24 | await asyncTimeout(1);
25 | assert.equal(2, ++x);
26 |
27 | done();
28 | }
29 | }
30 |
31 | new C().test();
32 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/AsyncMethodObjectLiteral.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncTimeout(ms) {
5 | return new Promise((resolve) => {
6 | setTimeout(resolve, ms);
7 | });
8 | }
9 |
10 | var object = {
11 | async test() {
12 | var x = 0;
13 | await asyncTimeout(1);
14 | assert.equal(1, ++x);
15 | await asyncTimeout(1);
16 | assert.equal(2, ++x);
17 | done();
18 | }
19 | }
20 |
21 | object.test();
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/AsyncSyntax.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 |
3 | var async;
4 | async
5 | function f() {
6 | return async + async;
7 | }
8 |
9 | async = 1;
10 | assert.equal(async, 1);
11 | assert.equal(f(), 2);
12 |
13 | async = async
14 | function g() {
15 |
16 | }
17 |
18 | assert.equal(async, 1);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Complete.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncComplete() {
5 | return new Promise((resolve) => {
6 | resolve('complete');
7 | });
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | (async function() {
13 | var value = await asyncComplete();
14 | assert.equal('complete', value);
15 | done();
16 | })();
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Disabled by default.
3 | // Error: :14:21: Semi-colon expected
4 |
5 | function asyncComplete() {
6 | return new Promise((resolve) => {
7 | resolve('complete');
8 | });
9 | }
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | (async function() {
14 | var value = async asyncComplete();
15 | assert.equal('complete', value);
16 | })();
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Finally.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | var finallyVisited = false;
5 |
6 | var resolve;
7 | var p = new Promise((r) => {
8 | resolve = r;
9 | });
10 | var v;
11 |
12 | async function test() {
13 | try {
14 | v = await p;
15 | } finally {
16 | finallyVisited = true;
17 | }
18 | assert.equal(42, v);
19 | assert.isTrue(finallyVisited);
20 | done();
21 | }
22 |
23 | test();
24 | assert.isFalse(finallyVisited);
25 | resolve(42);
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/PromiseCast.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | async function f() {
5 | var x = await 1;
6 | assert.equal(x, 1);
7 | x = await undefined;
8 | assert.equal(x, undefined);
9 | done();
10 | }
11 |
12 | f();
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Throw.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | async function asyncThrow(e) {
5 | if (true)
6 | throw e;
7 | await asyncYield();
8 | }
9 |
10 | function asyncYield() {
11 | return asyncTimeout(0);
12 | }
13 |
14 | function asyncTimeout(ms) {
15 | return new Promise((resolve) => {
16 | setTimeout(resolve, ms);
17 | });
18 | }
19 |
20 | (async function() {
21 | var value;
22 | try {
23 | value = await asyncThrow(1);
24 | fail("shouldn't get here");
25 | } catch (e) {
26 | assert.equal(1, e);
27 | }
28 |
29 | done();
30 | })();
31 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Timeout.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncTimeout(ms) {
5 | return new Promise((resolve) => {
6 | setTimeout(resolve, ms);
7 | });
8 | }
9 |
10 | (async function() {
11 | var x = 0;
12 | await asyncTimeout(1);
13 | assert.equal(1, ++x);
14 | await asyncTimeout(1);
15 | assert.equal(2, ++x);
16 | await asyncTimeout(1);
17 | assert.equal(3, ++x);
18 | await asyncTimeout(1);
19 | assert.equal(4, ++x);
20 | done();
21 | })();
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Value.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | async function asyncValue(value) {
5 | if (true)
6 | return value;
7 | await asyncYield();
8 | }
9 |
10 | function asyncYield() {
11 | return asyncTimeout(0);
12 | }
13 |
14 | function asyncTimeout(ms) {
15 | return new Promise((resolve) => {
16 | setTimeout(resolve, ms);
17 | });
18 | }
19 |
20 | (async function() {
21 | var value = await asyncValue(42);
22 | assert.equal(42, value);
23 | done();
24 | })();
25 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/AsyncFunctions/Yield.js:
--------------------------------------------------------------------------------
1 | // Options: --async-functions
2 | // Async.
3 |
4 | function asyncYield() {
5 | return asyncTimeout(0);
6 | }
7 |
8 | function asyncTimeout(ms) {
9 | return new Promise((resolve) => {
10 | setTimeout(resolve, ms);
11 | });
12 | }
13 |
14 | (async function() {
15 | await asyncYield();
16 | done();
17 | })();
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/ClassMethodInheritance.js:
--------------------------------------------------------------------------------
1 | function B() {}
2 | B.b = function() {
3 | return 'B.b';
4 | };
5 |
6 | class C extends B {}
7 |
8 | assert.equal(Object.getPrototypeOf(C), B);
9 | assert.equal(Object.getPrototypeOf(C.prototype), B.prototype);
10 |
11 | assert.equal(C.b(), 'B.b');
12 |
13 | class D extends Object {}
14 |
15 | assert.equal(Object.getPrototypeOf(D), Object);
16 | assert.equal(Object.getPrototypeOf(D.prototype), Object.prototype);
17 | assert.equal(D.keys, Object.keys);
18 |
19 | class E {}
20 |
21 | assert.equal(Object.getPrototypeOf(E), Function.prototype);
22 | assert.equal(Object.getPrototypeOf(E.prototype), Object.prototype);
23 | assert.isFalse('keys' in E);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/ClassNameInStack.js:
--------------------------------------------------------------------------------
1 | class MyClassName {
2 | m() {
3 | throw new Error();
4 | }
5 | }
6 |
7 | try {
8 | new MyClassName().m();
9 | fail('Should have thrown');
10 | } catch (ex) {
11 | if (ex.stack)
12 | assert.isTrue(String(ex.stack).indexOf('MyClassName') >= 0);
13 | }
14 |
15 | //////////////////////////////////////////////////////////////////////////////
16 |
17 | class MySecondClass extends MyClassName{
18 | m() {
19 | throw new Error();
20 | }
21 | }
22 |
23 | try {
24 | new MySecondClass().m();
25 | fail('Should have thrown');
26 | } catch (ex) {
27 | if (ex.stack)
28 | assert.isTrue(String(ex.stack).indexOf('MySecondClass') >= 0);
29 | }
30 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/ConstructorChaining.js:
--------------------------------------------------------------------------------
1 | class ConstructorA {
2 | constructor(x) {
3 | this.x = x;
4 | }
5 | }
6 |
7 | class ConstructorB extends ConstructorA {
8 | constructor(x, y) {
9 | super(x);
10 | this.y = y;
11 | }
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | var a = new ConstructorA('ax');
17 | assert.equal('ax', a.x);
18 | assert.isFalse(a.hasOwnProperty('y'));
19 |
20 | var b = new ConstructorB('bx', 'by');
21 | assert.equal('bx', b.x);
22 | assert.equal('by', b.y);
23 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/DefaultConstructor.js:
--------------------------------------------------------------------------------
1 | class B {
2 | constructor(x, y) {
3 | this.x = x;
4 | this.y = y;
5 | }
6 | }
7 |
8 | class C extends B {
9 | // No constructor
10 | }
11 |
12 | var c = new B(1, 2);
13 | assert.equal(1, c.x);
14 | assert.equal(2, c.y);
15 |
16 | assert.isFalse(
17 | Object.getOwnPropertyDescriptor(B.prototype, 'constructor').enumerable);
18 | assert.isFalse(
19 | Object.getOwnPropertyDescriptor(C.prototype, 'constructor').enumerable);
20 |
21 | // Ensure that we don't try to call super() in the default constructor.
22 | class D extends null {}
23 | var d = new D();
24 |
25 |
26 | class E extends function(x) {
27 | this.x = x;
28 | } {}
29 |
30 | var e = new E(42)
31 | assert.equal(42, e.x);
32 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/DeriveFromObject.js:
--------------------------------------------------------------------------------
1 | class DerivedFromObject extends Object {
2 | }
3 |
4 | // ----------------------------------------------------------------------------
5 |
6 | // TODO(rnystrom): No tests for this?
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/EmptyClass.js:
--------------------------------------------------------------------------------
1 | class Empty {}
2 |
3 | class EmptyB extends Empty {
4 | }
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | var e = new Empty();
9 | assert.isNotNull(e);
10 |
11 | for (var element in e) {
12 | assert.equal('constructor', element);
13 | }
14 |
15 | for (var element in Empty) {
16 | fail('Empty contains static member : ' + element);
17 | }
18 |
19 | // Instances should be different.
20 | var e2 = new Empty();
21 | assert.notEqual(e, e2);
22 |
23 | assert.isTrue(e instanceof Empty);
24 | assert.isFalse(e instanceof EmptyB);
25 |
26 | var b = new EmptyB();
27 |
28 | assert.isTrue(b instanceof Empty);
29 | assert.isTrue(b instanceof EmptyB);
30 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --classes=false
3 |
4 | class C {}
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Error_Super.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :8:17: Unexpected token ;
3 |
4 | class A {}
5 |
6 | class ImproperSuper extends A {
7 | method() {
8 | return super;
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Error_SuperAsTemplateTag.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :8:18: Unexpected token no substitution template
3 |
4 | class A {}
5 |
6 | class ImproperSuper extends A {
7 | method() {
8 | return super ``;
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/ExtendNonConstructableFunction.js:
--------------------------------------------------------------------------------
1 |
2 | assert.throw(function() {
3 | class C extends Math.pow {}
4 | }, TypeError);
5 |
6 | assert.throw(function() {
7 | function f() {}
8 | // prototype needs to be an Object or null.
9 | f.prototype = 42;
10 | class C extends f {}
11 | }, TypeError);
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/ExtendObject.js:
--------------------------------------------------------------------------------
1 | // Can no longer extend objects.
2 | assert.throw(function() {
3 | class C extends {} {}
4 | }, TypeError);
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/FieldInheritance.js:
--------------------------------------------------------------------------------
1 | class Point2D {
2 | constructor() {
3 | this.x = 1;
4 | this.y = 2;
5 | }
6 | }
7 |
8 | class Point3D extends Point2D {
9 | constructor() {
10 | super();
11 | this.z = 3;
12 | }
13 | }
14 |
15 | // ----------------------------------------------------------------------------
16 |
17 | var a = new Point2D();
18 | assert.isTrue(a.hasOwnProperty('x'));
19 | assert.isTrue(a.hasOwnProperty('y'));
20 | assert.isFalse(a.hasOwnProperty('z'));
21 | assert.isUndefined(a.z);
22 |
23 | var b = new Point3D();
24 | assert.isTrue(b.hasOwnProperty('x'));
25 | assert.isTrue(b.hasOwnProperty('y'));
26 | assert.isTrue(b.hasOwnProperty('z'));
27 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/FieldInitializers.js:
--------------------------------------------------------------------------------
1 | class Point {
2 | constructor() {
3 | this.x = 0;
4 | this.y = 0;
5 | }
6 | }
7 |
8 | // ----------------------------------------------------------------------------
9 |
10 | var p = new Point();
11 | assert.equal(0, p.x);
12 | assert.equal(0, p.y);
13 | p.x = 1;
14 | assert.equal(1, p.x);
15 |
16 | var p2 = new Point();
17 | assert.equal(0, p2.x);
18 | assert.equal(0, p2.y);
19 | assert.equal(1, p.x);
20 |
21 | for (var element in Point) {
22 | fail('Point contains static member : ' + element);
23 | }
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Fields.js:
--------------------------------------------------------------------------------
1 | class Point {
2 | constructor() {
3 | this.x = 0;
4 | this.y = 0;
5 | }
6 | }
7 |
8 | // ----------------------------------------------------------------------------
9 |
10 | var p = new Point();
11 |
12 | var keys = [];
13 | for (var key in p) {
14 | keys.push(key);
15 | }
16 |
17 | assert.isTrue(keys.indexOf('x') !== -1);
18 | assert.isTrue(keys.indexOf('y') !== -1);
19 | assert.isTrue(keys.indexOf('constructor') === -1);
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Getters.js:
--------------------------------------------------------------------------------
1 | class GetterA {
2 | get x() { return 'getter x'; }
3 | get y() { return 'getter y'; }
4 | }
5 |
6 | class GetterB extends GetterA {
7 | get x() { return super.x; }
8 | }
9 |
10 | class GetterC extends GetterB {
11 | get y() { return super.y; }
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | var b = new GetterB();
17 | var c = new GetterC();
18 |
19 | assert.equal('getter x', b.x);
20 | assert.equal('getter y', c.y);
21 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Inheritance.js:
--------------------------------------------------------------------------------
1 | class SimpleBase {}
2 | class SimpleDerived extends SimpleBase {}
3 |
4 | // ----------------------------------------------------------------------------
5 |
6 | var derived = new SimpleDerived();
7 | assert.isTrue(derived instanceof SimpleDerived);
8 | assert.isTrue(derived instanceof SimpleBase);
9 | assert.isTrue(derived instanceof Object);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/InheritanceFromNonclass.js:
--------------------------------------------------------------------------------
1 | function noClassA() {}
2 | noClassA.prototype = {
3 | ma: function() { return 'ma'; }
4 | }
5 |
6 | class NoClassB extends noClassA {
7 | mb() {
8 | return 'mb ' + super.ma();
9 | }
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | var b = new NoClassB;
15 | assert.isTrue(b instanceof noClassA);
16 | assert.equal('ma', b.ma());
17 | assert.equal('mb ma', b.mb());
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/InheritanceNameBinding.js:
--------------------------------------------------------------------------------
1 | class NameBindingBase {}
2 |
3 | class NameBindingDerived extends NameBindingBase {
4 | getX() { return this.x; }
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
9 | var derived = new NameBindingDerived();
10 | derived.x = 12;
11 | assert.equal(12, derived.getX());
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Method.js:
--------------------------------------------------------------------------------
1 | class Universe {
2 | answer() {
3 | return 42;
4 | }
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
9 | var universe = new Universe();
10 | assert.equal(42, universe.answer());
11 |
12 | var keys = [];
13 | for (var key in universe) {
14 | keys.push(key);
15 | }
16 | assert.isTrue(keys.indexOf('answer') !== -1);
17 | assert.isTrue(keys.indexOf('constructor') === -1);
18 |
19 | for (var key in Universe) {
20 | fail('Universe contains static member : ' + key);
21 | }
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/MethodLookup.js:
--------------------------------------------------------------------------------
1 | class MethodLookupA {
2 | foo() {
3 | return 'A.foo()';
4 | }
5 | get bar() {
6 | return 'A.get.bar';
7 | }
8 | set bar(value) { }
9 | }
10 |
11 | class MethodLookupB extends MethodLookupA {
12 | get foo() {
13 | return 'B.foo.get';
14 | }
15 | set foo(value) { }
16 | bar() {
17 | return 'B.bar()';
18 | }
19 | }
20 |
21 | class MethodLookupC extends MethodLookupB {
22 | x() {
23 | return super.foo;
24 | }
25 | y() {
26 | return super.bar();
27 | }
28 | }
29 |
30 | // ----------------------------------------------------------------------------
31 |
32 | var c = new MethodLookupC();
33 | assert.equal('B.foo.get', c.x());
34 | assert.equal('B.bar()', c.y());
35 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/NewClassExpression.js:
--------------------------------------------------------------------------------
1 |
2 | assert.equal((new class {
3 | get x() {
4 | return 'x';
5 | }
6 | getX() {
7 | return this.x;
8 | }
9 | }).getX(), 'x');
10 |
11 | assert.equal(new class {
12 | get y() {
13 | return 'y';
14 | }
15 | getY() {
16 | return this.y;
17 | }
18 | }().getY(), 'y');
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/OptionalParams.js:
--------------------------------------------------------------------------------
1 | class OptionalParams {
2 | constructor(opt = 1) {
3 | this.opt = opt;
4 | }
5 | instanceMethod(opt = 2) {
6 | return opt;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | var obj = new OptionalParams();
13 | assert.equal(1, obj.opt);
14 | assert.equal(2, obj.instanceMethod());
15 | assert.equal(3, obj.instanceMethod(3));
16 |
17 | var obj2 = new OptionalParams(2);
18 | assert.equal(2, obj2.opt);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/PrototypeDescriptor.js:
--------------------------------------------------------------------------------
1 | class C {}
2 |
3 | var descr = Object.getOwnPropertyDescriptor(C, 'prototype');
4 | assert.isFalse(descr.enumerable);
5 | assert.isFalse(descr.configurable);
6 | assert.isFalse(descr.writable);
7 | assert.equal(descr.value, C.prototype);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/RestParams.js:
--------------------------------------------------------------------------------
1 | class RestParams {
2 | constructor(...rest) {
3 | this.rest = rest;
4 | }
5 | instanceMethod(...rest) {
6 | return rest;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | var obj = new RestParams(0, 1, 2);
13 | assertArrayEquals([0, 1, 2], obj.rest);
14 | assertArrayEquals([3, 4, 5], obj.instanceMethod(3, 4, 5));
15 |
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SemiColon.js:
--------------------------------------------------------------------------------
1 | class SemiColon {
2 | ;
3 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Skip_HTMLBlockquoteElement.js:
--------------------------------------------------------------------------------
1 | // Skip. Not implemented.
2 | // Only in browser.
3 |
4 | class CustomBlockquote extends HTMLBlockquoteElement {
5 | constructor() {
6 | this.custom = 42;
7 | }
8 | }
9 |
10 | var customBlockquote = new CustomBlockquote;
11 | assert.equal(42, customBlockquote.custom);
12 | assert.equal('BLOCKQUOTE', customBlockquote.tagName);
13 | assert.isTrue(customBlockquote instanceof CustomBlockquote);
14 | assert.isTrue(customBlockquote instanceof HTMLBlockquoteElement);
15 | assert.isTrue(customBlockquote instanceof HTMLQuoteElement);
16 | assert.isTrue(customBlockquote instanceof HTMLElement);
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/StaticSuper.js:
--------------------------------------------------------------------------------
1 | var x = 'B.getter';
2 |
3 | class B {
4 | static method() {
5 | return [this, 'B.method'];
6 | }
7 |
8 | static get getter() {
9 | return [this, x];
10 | }
11 |
12 | static set setter(value) {
13 | x = [this, value];
14 | }
15 | }
16 |
17 | class C extends B {
18 | static method() {
19 | return super.method();
20 | }
21 |
22 | static get getter() {
23 | return super.getter;
24 | }
25 |
26 | static set setter(value) {
27 | super.setter = value;
28 | }
29 | }
30 |
31 | assertArrayEquals([C, 'B.method'], C.method());
32 | assertArrayEquals([C, 'B.getter'], C.getter);
33 |
34 | C.setter = 'B.setter';
35 | assertArrayEquals([C, 'B.setter'], x);
36 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/StaticSymbol.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 | var sym = Symbol();
3 | class C {
4 | static [sym]() {
5 | return 42;
6 | }
7 | }
8 | assert.equal(C[sym](), 42);
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Strict.js:
--------------------------------------------------------------------------------
1 | class C1 {
2 | m() {
3 | return function() {
4 | return this;
5 | }();
6 | }
7 | }
8 |
9 | class C2 extends C1 {
10 | m() {
11 | return function() {
12 | return this;
13 | }();
14 | }
15 | }
16 |
17 | var C3 = class {
18 | m() {
19 | return function() {
20 | return this;
21 | }();
22 | }
23 | };
24 |
25 | var C4 = class extends C3 {
26 | m() {
27 | return function() {
28 | return this;
29 | }();
30 | }
31 | };
32 |
33 | assert.isUndefined(new C1().m());
34 | assert.isUndefined(new C2().m());
35 | assert.isUndefined(new C3().m());
36 | assert.isUndefined(new C4().m());
37 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SuperChaining.js:
--------------------------------------------------------------------------------
1 | class ChainA {
2 | foo() {
3 | return 'A';
4 | }
5 | }
6 |
7 | class ChainB extends ChainA {
8 | foo() {
9 | return super.foo() + ' B';
10 | }
11 | }
12 |
13 | class ChainC extends ChainB {
14 | foo() {
15 | return super.foo() + ' C';
16 | }
17 | }
18 |
19 | class ChainD extends ChainC {
20 | foo() {
21 | return super.foo() + ' D';
22 | }
23 | }
24 |
25 | // ----------------------------------------------------------------------------
26 |
27 | var d = new ChainD();
28 | assert.equal('A B C D', d.foo());
29 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SuperChangeProto.js:
--------------------------------------------------------------------------------
1 | var log = '';
2 |
3 | class Base {
4 | p() { log += '[Base]'; }
5 | }
6 |
7 | class OtherBase {
8 | p() { log += '[OtherBase]'; }
9 | }
10 | class Derived extends Base {
11 | p() {
12 | log += '[Derived]';
13 | super();
14 | Derived.prototype.__proto__ = OtherBase.prototype;
15 | super();
16 | }
17 | }
18 |
19 | new Derived().p();
20 | assert.equal(log, '[Derived][Base][OtherBase]');
21 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SuperPostfix.js:
--------------------------------------------------------------------------------
1 | class B {
2 | constructor() {
3 | this._x = 0;
4 | }
5 | get x() {
6 | return this._x;
7 | }
8 | set x(x) {
9 | this._x = x;
10 | }
11 | }
12 |
13 | class C extends B {
14 | m() {
15 | assert.equal(this.x, 0);
16 | assert.equal(super.x++, 0);
17 | assert.equal(this.x, 1);
18 | assert.equal(super.x--, 1);
19 | assert.equal(this.x, 0);
20 | }
21 | }
22 |
23 | new C().m();
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SuperUnary.js:
--------------------------------------------------------------------------------
1 | class B {
2 | constructor() {
3 | this._x = 0;
4 | }
5 | get x() {
6 | return this._x;
7 | }
8 | set x(x) {
9 | this._x = x;
10 | }
11 | }
12 |
13 | class C extends B {
14 | m() {
15 | assert.equal(this.x, 0);
16 | assert.equal(++super.x, 1);
17 | assert.equal(this.x, 1);
18 | assert.equal(--super.x, 0);
19 | assert.equal(this.x, 0);
20 |
21 | // Don't use assert.typeOf since we are testing typeof.
22 | assert.equal(typeof super.x, 'number');
23 | }
24 | }
25 |
26 | new C().m();
27 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/SuperWithoutExtends.js:
--------------------------------------------------------------------------------
1 | class C {
2 | constructor() {
3 | this.x = true;
4 | }
5 | static m() {
6 | return super.hasOwnProperty('m');
7 | }
8 |
9 | m() {
10 | return super.hasOwnProperty('x');
11 | }
12 | }
13 |
14 | assert.isTrue(new C().m());
15 | assert.isTrue(C.m());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Classes/Types.js:
--------------------------------------------------------------------------------
1 | // Options: --types
2 |
3 | class Typed {
4 | constructor(x : number) {
5 | this.x_ = x;
6 | }
7 |
8 | addTo(y : number) : number {
9 | this.x += y;
10 | return this.x;
11 | }
12 |
13 | get x() : number {
14 | return this.x_;
15 | }
16 |
17 | set x(x : number) {
18 | this.x_ = x;
19 | }
20 | }
21 |
22 | assert.equal(1, new Typed(1).x);
23 | assert.equal(2, new Typed(1).addTo(1));
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ComputedPropertyNames/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --computed-property-names=false
3 | // Error: :6:3: '}' expected
4 |
5 | var object = {
6 | [1]: 2
7 | };
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ComputedPropertyNames/Symbol.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 |
3 | var s = Symbol();
4 |
5 | var object = {
6 | [s]: 42
7 | };
8 |
9 | assert.equal(object[s], 42);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/DefaultParameters/Error_SetAccessor.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :6:15: ')' expected
3 |
4 | var object = {
5 | // Default parameters are not allowed on setters.
6 | set x(value = 42) {}
7 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/DefaultParameters/Strict.js:
--------------------------------------------------------------------------------
1 | function f(a = 1) {
2 | 'use strict';
3 | return this;
4 | }
5 |
6 | assert.isUndefined(f());
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Arguments.js:
--------------------------------------------------------------------------------
1 | function destructureArguments(x, y) {
2 | [arguments[0], [arguments[1]]] = [1, [2]]
3 | return x + y;
4 | }
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | assert.equal(3, destructureArguments(1, 2));
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Array.js:
--------------------------------------------------------------------------------
1 | function destructArray() {
2 | var a, b, c, d;
3 | [a, [b], c, d] = ['hello', [',', 'junk'], ['world']];
4 | return {
5 | a: a,
6 | b: b,
7 | c: c,
8 | d: d
9 | };
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | var result = destructArray();
15 | assert.equal('hello', result.a);
16 | assert.equal(',', result.b);
17 | assertArrayEquals(['world'], result.c);
18 | assert.isUndefined(result.d);
19 |
20 | function testNested() {
21 | var a;
22 | [[a] = ['b']] = [];
23 | return a;
24 | }
25 | assert.equal(testNested(), 'b');
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/ArrowFunction.js:
--------------------------------------------------------------------------------
1 | var f = ({x}) => x;
2 | assert.equal(42, f({x: 42}));
3 |
4 | var g = ({x: y, z: [a, b, ...c]}) => [y, a, b, c];
5 | assertArrayEquals([1, 2, 3, [4, 5]], g({x: 1, z: [2, 3, 4, 5]}));
6 |
7 | var h = ([a, {b: c, d}]) => [a, c, d];
8 | assertArrayEquals([1, 2, 3], h([1, {b: 2, d: 3}]));
9 |
10 | var i = ([, a]) => a;
11 | assert.equal(i([0, 1]), 1);
12 |
13 | var j = ([, [, a]]) => a;
14 | assert.equal(j([0, [1, 2]]), 2);
15 |
16 | var k = ([a] = new String('b')) => a;
17 | assert.equal(k(), 'b');
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Catch.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 | // Block binding is needed to get the right scoping semantics inside the catch
3 | // block.
4 |
5 | var head = 'head';
6 | var tail = 'tail';
7 | var name = 'name';
8 |
9 | function MyError(s) {
10 | this.message = new String(s);
11 | this.name = 'Error';
12 | }
13 |
14 | try {
15 | throw new MyError('abc');
16 | } catch ({message: [head, ...tail], name}) {
17 | assert.equal('a', head);
18 | assertArrayEquals(['b', 'c'], tail);
19 | assert.equal('Error', name);
20 | }
21 |
22 | assert.equal('head', head);
23 | assert.equal('tail', tail);
24 | assert.equal('name', name);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/DefaultParams.js:
--------------------------------------------------------------------------------
1 | function f([x] = [1], {y} = {y: 2}) {
2 | return x + y;
3 | }
4 |
5 | assert.equal(3, f());
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Empty.js:
--------------------------------------------------------------------------------
1 | var calls = 0;
2 |
3 | var {} = Object(calls++);
4 | assert.equal(calls, 1);
5 |
6 | var [] = Object(calls++);
7 | assert.equal(calls, 2);
8 |
9 | var {} = Object(calls++), [] = Object(calls++);
10 | assert.equal(calls, 4);
11 |
12 |
13 | ///////////////////////
14 |
15 | calls = 0;
16 |
17 | ({} = Object(calls++));
18 | assert.equal(calls, 1);
19 |
20 | [] = Object(calls++);
21 | assert.equal(calls, 2);
22 |
23 | ({} = Object(calls++), [] = Object(calls++));
24 | assert.equal(calls, 4);
25 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_Catch.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: innerX is not defined
3 |
4 | try {
5 | throw [0];
6 | } catch ([innerX]) {
7 |
8 | }
9 |
10 | innerX;
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --destructuring=false
3 |
4 | var [x, y] = [0, 1];
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_ForInWithInitializer.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: initialiser is not allowed in for-in loop with pattern
3 |
4 | for (var {k} = {} in {}) {
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_ForOfWithInitializer.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: initialiser is not allowed in for-of loop with pattern
3 | // Error: for-of statement may not have initialiser
4 |
5 | for (var {k} = {} of []) {
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_InvalidArrowRest.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:11: Unexpected token ...
3 |
4 | var f = ([...xs, ys]) => xs;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Error_InvalidCoverInitialisedName.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:5: Unexpected token '='
3 |
4 | ({x = 42});
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/EvaluatesToRvalue.js:
--------------------------------------------------------------------------------
1 | function destructEvaluatesToRvalue() {
2 | var a;
3 | return [a] = [1, 2, 3];
4 | }
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | var result = destructEvaluatesToRvalue();
9 | assertArrayEquals([1, 2, 3], result);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/EvaluationOrder.js:
--------------------------------------------------------------------------------
1 | function destructEvaluationOrder() {
2 | var a;
3 | [a, a, a] = [1, 2, 3, 4];
4 | return a;
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
9 | var result = destructEvaluationOrder();
10 | assert.equal(3, result);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/ForInLoop.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var object = {
4 | abc: 0, // Keep all the keys at length 3.
5 | def: 1
6 | };
7 |
8 | var expectedHeads = ['a', 'd'];
9 | var expectedTails = [['b', 'c'], ['e','f']];
10 | var i = 0;
11 | for (var [head, ...tail] in object) {
12 | assert.equal(expectedHeads[i], head);
13 | assertArrayEquals(expectedTails[i], tail);
14 | i++;
15 | }
16 | assert.equal(2, i);
17 |
18 | {
19 | let x = 42;
20 | for (let {length: x} in object) {
21 | assert.equal(3, x);
22 | }
23 | assert.equal(42, x);
24 | }
25 |
26 | var k;
27 | for ({length: k} in {abc: 3}) // No block
28 | assert.equal(3, k);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/ForOfLoop.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function* gen() {
4 | yield new String('abc');
5 | yield new String('def');
6 | }
7 |
8 | var expectedHeads = ['a', 'd'];
9 | var expectedTails = [['b', 'c'], ['e','f']];
10 | var i = 0;
11 | for (var [head, ...tail] of gen()) {
12 | assert.equal(expectedHeads[i], head);
13 | assertArrayEquals(expectedTails[i], tail);
14 | i++;
15 | }
16 | assert.equal(2, i);
17 |
18 | {
19 | let x = 42;
20 | for (let {length: x} of gen()) {
21 | assert.equal(3, x);
22 | }
23 | assert.equal(42, x);
24 | }
25 |
26 | var k;
27 | for ({length: k} of [new String('abc')]) // No block
28 | assert.equal(3, k);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/FunctionArrayPattern.js:
--------------------------------------------------------------------------------
1 | function f([a, b, ...c], d) {
2 | return [a, b, c, d];
3 | }
4 | assertArrayEquals([1, 2, [3, 4], 5], f([1, 2, 3, 4], 5));
5 |
6 | function g([, a]) {
7 | return a;
8 | }
9 | assert.equal(g([0, 1]), 1);
10 |
11 | function h([, [, a]]) {
12 | return a;
13 | }
14 | assert.equal(h([0, [1, 2]]), 2);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/FunctionObjectPattern.js:
--------------------------------------------------------------------------------
1 | function f({a, b: {c}}, d) {
2 | return [a, c, d];
3 | }
4 |
5 | assertArrayEquals([1, 2, 3], f({a: 1, b: {c: 2}}, 3));
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Initialiser.js:
--------------------------------------------------------------------------------
1 | var [a = 0] = [];
2 | assert.equal(0, a);
3 |
4 | var {b = 1} = {};
5 | assert.equal(1, b);
6 |
7 | var {c = 2} = {c: 3};
8 | assert.equal(3, c);
9 |
10 | var {d = 4} = Object.create({d: 5});
11 | assert.equal(5, d);
12 |
13 | var {e: f = 6} = {};
14 | assert.equal(6, f);
15 |
16 | var {g: h = 7} = {h: 8};
17 | assert.equal(7, h);
18 |
19 | var [, , , i = 9] = [10, 11, 12];
20 | assert.equal(9, i);
21 |
22 | function j({x = 42}, expected) {
23 | assert.equal(expected, x);
24 | }
25 |
26 | j({}, 42);
27 | j({x: 43}, 43);
28 |
29 | var count = 0;
30 | var [k = 42] = (count++, [21]);
31 | assert.equal(21, k);
32 | assert.equal(1, count);
33 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Method.js:
--------------------------------------------------------------------------------
1 | function MyError(s) {
2 | this.message = new String(s);
3 | this.name = 'Error';
4 | }
5 |
6 | var object = {
7 | method({message: [head, ...tail], name}) {
8 | assert.equal('a', head);
9 | assertArrayEquals(['b', 'c'], tail);
10 | assert.equal('Error', name);
11 | }
12 | };
13 |
14 | object.method(new MyError('abc'));
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/NestedScopeArguments.js:
--------------------------------------------------------------------------------
1 | // Destructuring bind alpha-renames 'arguments'; this ensures that
2 | // renaming doesn't rename in nested scopes.
3 | function destructNestedScopeArguments(x) {
4 | [(function () { return arguments[1]; })(null, x)[0]] = [42];
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
9 | var result = [];
10 | destructNestedScopeArguments(result);
11 | assert.equal(42, result[0]);
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Rest.js:
--------------------------------------------------------------------------------
1 | function destructRest() {
2 | var a, b, c, d, e;
3 | [...a] = [1, 2, 3];
4 | [b, ...c] = [1, 2, 3];
5 | [,,, ...d] = [1, 2, 3];
6 | [...e] = {x: 'boom'};
7 | return {a: a, b: b, c: c, d: d, e: e};
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | var result = destructRest();
13 | assertArrayEquals([1, 2, 3], result.a);
14 | assert.equal(1, result.b);
15 | assertArrayEquals([2, 3], result.c);
16 | assertArrayEquals([], result.d);
17 | assertArrayEquals([], result.e);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/ScopeThis.js:
--------------------------------------------------------------------------------
1 | function destructScopeThis() {
2 | var x;
3 | var o = {
4 | f: function() {
5 | [this.x] = [1];
6 | }
7 | };
8 | o.f();
9 | return {
10 | x: x,
11 | o_x: o.x
12 | };
13 | }
14 |
15 | // ----------------------------------------------------------------------------
16 |
17 | var result = destructScopeThis();
18 | assert.isUndefined(result.x);
19 | assert.equal(1, result.o_x);
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/SetAccessor.js:
--------------------------------------------------------------------------------
1 | function MyError(s) {
2 | this.message = new String(s);
3 | this.name = 'Error';
4 | }
5 |
6 | var object = {
7 | set x({message: [head, ...tail], name}) {
8 | assert.equal('a', head);
9 | assertArrayEquals(['b', 'c'], tail);
10 | assert.equal('Error', name);
11 | }
12 | };
13 |
14 | object.x = new MyError('abc');
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/Strict.js:
--------------------------------------------------------------------------------
1 | function f({x}) {
2 | 'use strict';
3 | return this;
4 | }
5 |
6 | assert.isUndefined(f({x: 42}));
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Destructuring/TopLevel.js:
--------------------------------------------------------------------------------
1 | var a, b, c, d;
2 | [a, [b, c], d] = ['hello', [',', 'junk'], ['world']];
3 |
4 | // ----------------------------------------------------------------------------
5 |
6 | assert.equal('hello', a);
7 | assert.equal(',', b);
8 | assert.equal('junk', c);
9 | assertArrayEquals(['world'], d);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/FreeVariableChecker/Error_With.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: missingVarWith is not defined
3 | var o = {};
4 | with (o) {
5 | missingVarWith = 42;
6 | }
7 | var x = missingVarWith * 2;
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/FreeVariableChecker/Typeof.js:
--------------------------------------------------------------------------------
1 | function f() {
2 | if (typeof x1)
3 | x1;
4 | }
5 |
6 | function g() {
7 | typeof x2;
8 | x2;
9 | }
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/FreeVariableChecker/WithBasic.js:
--------------------------------------------------------------------------------
1 | var o = {
2 | unicorns: 42,
3 | fairyGodmothers: 3
4 | };
5 |
6 | with (o) {
7 | x = 42;
8 | y = x * x;
9 |
10 | bubbles = 1000;
11 | fairyGodmotherBubbles = bubbles * fairyGodmothers;
12 | unicorns = bubbles * fairyGodmothers - (fairyGodmotherBubbles - unicorns);
13 | }
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/FreeVariableChecker/WithVarDecl.js:
--------------------------------------------------------------------------------
1 | var o = {xW: 0, yW: 0, propW: {xW: 0, yW: 0, funcW: null}};
2 |
3 | with (o) {
4 | xW = 20;
5 | yW = xW * xW;
6 | function funcW(x, y) { return y / x + x; }
7 | var withVar;
8 | }
9 |
10 | withVar = 20;
11 | assert.equal(40, funcW(o.xW, o.yW));
12 |
13 | with (o) {
14 | with (propW) {
15 | xW = 21;
16 | yW = xW * xW;
17 | funcW = function(f, x, y) { return f(x, y) * 100; }
18 | var withVar2;
19 | }
20 | }
21 |
22 | withVar2 = 20;
23 | var op = o.propW;
24 | assert.equal(42, funcW(op.xW, op.yW));
25 | assert.equal(4200, op.funcW(funcW, op.xW, op.yW));
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/GeneratorComprehension/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --generator-comprehension=false
3 | // Error: :5:13: Unexpected token for
4 |
5 | var iter = (for (x of [0, 1, 2, 3, 4]) x);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/GeneratorComprehension/Error_NotDefined.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | var iter = (for (notDefined of [0]) notDefined);
4 | notDefined;
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/GeneratorComprehension/Skip_Closure.js:
--------------------------------------------------------------------------------
1 | // Skip. The sugaring uses var instead of let which leads to wrong closure.
2 |
3 | var iter = (for (x of [0, 1]) for (y of [2, 3]) () => [x, y] );
4 |
5 | assert.isTrue(iter.moveNext());
6 | var f1 = iter.current;
7 |
8 | assert.isTrue(iter.moveNext());
9 | var f2 = iter.current;
10 |
11 | assert.isTrue(iter.moveNext());
12 | var f3 = iter.current;
13 |
14 | assert.isTrue(iter.moveNext());
15 | var f4 = iter.current;
16 |
17 | assert.isFalse(iter.moveNext());
18 |
19 | assertArrayEquals([0, 2], f1());
20 | assertArrayEquals([0, 3], f2());
21 | assertArrayEquals([1, 2], f3());
22 | assertArrayEquals([1, 3], f4());
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/EmptyNamedImport.js:
--------------------------------------------------------------------------------
1 | import {} from './resources/m';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_DuplicateImport.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: feature/Modules/Error_DuplicateImport.js:7:9: 'a' was previously imported at feature/Modules/Error_DuplicateImport.js:6:9
3 | // Error: feature/Modules/Error_DuplicateImport.js:10:8: 'd' was previously imported at feature/Modules/Error_DuplicateImport.js:9:8
4 | // Error: feature/Modules/Error_DuplicateImport.js:11:9: 'd' was previously imported at feature/Modules/Error_DuplicateImport.js:9:8
5 |
6 | import {a} from './resources/a';
7 | import {c as a} from './resources/c';
8 |
9 | import d from './resources/default-class';
10 | import d from './resources/default-name';
11 | import {a as d} from './resources/a2';
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ExportKeyword.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:9: 'identifier' expected
3 |
4 | export {if};
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ExportKeyword2.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:9: 'identifier' expected
3 |
4 | export {if as x};
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ExportStarConflict.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: feature/Modules/resources/export-conflict.js:2:8: Duplicate export. 'a' was previously exported at feature/Modules/resources/export-conflict.js:1:12
3 |
4 | import {a} from './resources/export-conflict';
5 |
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ExportStarDuplicateExport.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: feature/Modules/Error_ExportStarDuplicateExport.module.js:5:8: Duplicate export. 'a' was previously exported at feature/Modules/Error_ExportStarDuplicateExport.module.js:4:8
3 |
4 | export * from './resources/a';
5 | export * from './resources/a2';
6 |
7 | assert.equal(1, 2);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ImportDefault.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: feature/Modules/Error_ImportDefault.js:4:8: 'default' is not exported by 'feature/Modules/resources/a'
3 |
4 | import error from './resources/a';
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ImportStar.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:8: 'string literal' expected
3 |
4 | import * from './resources/m';
5 | assert.equal(3, a + b);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_InvalidExport.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:9: 'c' is not exported by '
3 |
4 | export {c} from './resources/a';
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_InvalidExport2.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:9: 'c' is not exported by '
3 |
4 | export {c as d} from './resources/a';
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_InvalidExport3.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: feature/Modules/Error_InvalidExport3.module.js:4:9: 'c' is not exported by 'feature/Modules/resources/b'
3 |
4 | export {c as d} from './resources/b';
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_InvalidModuleDeclaration.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: Failed to load 'feature/Modules/resources/no_such_file.js'
3 | // Error: Specified as ./resources/no_such_file.
4 | // Error: Imported by feature/Modules/Error_InvalidModuleDeclaration.
5 | // Error: Normalizes to feature/Modules/resources/no_such_file
6 | // Error: LoaderHooks.locate resolved against base './'
7 |
8 |
9 | module b from './resources/no_such_file';
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_InvalidModuleDeclaration2.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 4:33: Unexpected token .
3 |
4 | module b from './resources/a.js'.c;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_MissingExport.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :6:12: 'y' is not exported by 'feature/Modules/resources/x'
3 | // Error: :6:15: 'z' is not exported by 'feature/Modules/resources/x'
4 | // Error: :7:9: 'w' is not exported by 'feature/Modules/resources/x'
5 |
6 | import {x, y, z} from './resources/x';
7 | import {w} from './resources/x';
8 |
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Error_ModuleNoNewline.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:3: Semi-colon expected
3 |
4 | module
5 | m from 'm';
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ExportStar.js:
--------------------------------------------------------------------------------
1 | module o from './resources/o';
2 |
3 | assert.equal(1, o.a);
4 | assert.equal(2, o.b);
5 | assert.equal(3, o.c);
6 | assert.equal(4, o.d);
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/Exports.js:
--------------------------------------------------------------------------------
1 | module a from './resources/i';
2 |
3 | (function() {
4 | 'use strict';
5 | assert.equal(0, a.i);
6 | a.inc();
7 | assert.equal(1, a.i);
8 |
9 | assert.throws(function() {
10 | a.i = 2;
11 | }, TypeError);
12 | })();
13 |
14 | assert.equal(1, a.i);
15 |
16 | module d from './resources/d';
17 | assert.equal('A', d.a);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportAsExportAs.js:
--------------------------------------------------------------------------------
1 | module m from './resources/m3';
2 | assert.equal(m.x, 'z');
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportCircular.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: Unsupported circular dependency between feature/Modules/ImportCircular.module and feature/Modules/resources/clockwise
3 |
4 | import {clockwise} from './resources/clockwise';
5 | export function counterclockwise() {
6 | return clockwise();
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportDefault.js:
--------------------------------------------------------------------------------
1 | import x from './resources/default';
2 | assert.equal(x, 42);
3 |
4 | import C from './resources/default-class';
5 | assert.equal(new C().m(), 'm');
6 |
7 | import {default as D} from './resources/default-name';
8 | assert.equal(D, 4);
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportEmptyImportClause.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 | import {} from './resources/side-effect2';
3 | assert.equal(2, this.sideEffect);
4 | this.sideEffect = 1;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportFromModule.js:
--------------------------------------------------------------------------------
1 | import {a as renamedX, b} from './resources/m';
2 | import {a} from './resources/m';
3 | module m2 from './resources/m';
4 |
5 | assert.equal(1, a);
6 | assert.equal(1, renamedX);
7 | assert.equal(2, b);
8 |
9 | module m from './resources/m';
10 |
11 | assert.equal(a, renamedX);
12 | assert.equal(a, m.a);
13 |
14 | module m2 from './resources/m';
15 |
16 | assert.isTrue(m === m2);
17 | assert.equal(b, m.b);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ImportNoImportClause.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 1;
2 | import './resources/side-effect';
3 | assert.equal(2, this.sideEffect);
4 | this.sideEffect = 1;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ModuleDefault.js:
--------------------------------------------------------------------------------
1 | module m from './resources/default';
2 |
3 | assert.equal(m.default, 42);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ModuleName.module.js:
--------------------------------------------------------------------------------
1 | assert.equal(__moduleName, 'feature/Modules/ModuleName.module');
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ModuleNoNewline.js:
--------------------------------------------------------------------------------
1 | module
2 | 'm'
3 | {
4 | var x = 42;
5 | }
6 |
7 | var module = {test: 42};
8 |
9 | module;
10 | module.test;
11 | // No semicolon on next line
12 | module
13 |
14 | // No semicolon nor newline at end of next line
15 | module
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/StaticMethod.js:
--------------------------------------------------------------------------------
1 | import {TestClass} from './resources/TestClass';
2 | assert.equal(TestClass.method(), 42);
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/ThisInModules.js:
--------------------------------------------------------------------------------
1 | var global = this;
2 |
3 | module m from './resources/f';
4 | assert.equal(global, m.f());
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/TestClass.js:
--------------------------------------------------------------------------------
1 | export class TestClass {
2 | static method() {
3 | return 42;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/a.js:
--------------------------------------------------------------------------------
1 | export var a = 'A';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/a2.js:
--------------------------------------------------------------------------------
1 | export var a = 'A2';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/b.js:
--------------------------------------------------------------------------------
1 | module c from './c';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/c.js:
--------------------------------------------------------------------------------
1 | export var c = 'C';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/clockwise.js:
--------------------------------------------------------------------------------
1 | import {counterclockwise} from '../ImportCircular.module';
2 | export function clockwise() {
3 | return 'The circle is complete';
4 | }
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/d.js:
--------------------------------------------------------------------------------
1 | export * from './a';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/default-class.js:
--------------------------------------------------------------------------------
1 | export default class {
2 | m() {
3 | return 'm';
4 | }
5 | };
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/default-name.js:
--------------------------------------------------------------------------------
1 | var p = 4;
2 | export {p as default};
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/default.js:
--------------------------------------------------------------------------------
1 | export default 42;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/export-conflict.js:
--------------------------------------------------------------------------------
1 | export var a = 'a';
2 | export * from './a'; // also exports a
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/f.js:
--------------------------------------------------------------------------------
1 | export var f = () => this;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/i.js:
--------------------------------------------------------------------------------
1 | export var i = 0;
2 | export function inc() {
3 | i++;
4 | }
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/m.js:
--------------------------------------------------------------------------------
1 | export var a = 1;
2 | export var b = 2;
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/m2.js:
--------------------------------------------------------------------------------
1 | var z = 'z';
2 | export {z as var};
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/m3.js:
--------------------------------------------------------------------------------
1 | import {var as x} from './m2';
2 | export {x};
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/n.js:
--------------------------------------------------------------------------------
1 | export var c = 3;
2 | export var d = 4;
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/o.js:
--------------------------------------------------------------------------------
1 | export * from './m';
2 | export * from './n';
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/side-effect.js:
--------------------------------------------------------------------------------
1 | this.sideEffect++;
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/side-effect2.js:
--------------------------------------------------------------------------------
1 | this.sideEffect++;
2 |
3 |
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Modules/resources/x.js:
--------------------------------------------------------------------------------
1 | export var x = 'X';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/NumericLiteral/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --numeric-literals=false
3 | // Error: :5:2: Semi-colon expected
4 |
5 | 0b11;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/NumericLiteral/Error_NoBinaryDigits.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --numeric-literals
3 | // Error: :5:3: Binary Integer Literal must contain at least one digit
4 |
5 | 0b;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/NumericLiteral/Error_NoOctalDigits.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --numeric-literals
3 | // Error: :5:3: Octal Integer Literal must contain at least one digit
4 |
5 | 0o;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectAssign.js:
--------------------------------------------------------------------------------
1 | var target = {a: 0, b: 2};
2 | var source = {a: 1, c: 3, get d() { return this.b || this.a + 64; }};
3 | var assigned = Object.assign(target, source);
4 |
5 | // ----------------------------------------------------------------------------
6 |
7 | assert.isTrue(Object.hasOwnProperty("assign"));
8 | assert.equal(assigned.a, source.a);
9 | assert.equal(assigned.b, target.b);
10 | assert.equal(assigned.c, source.c);
11 | assert.equal(assigned.d, source.d);
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectInitialiserShorthand/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --property-name-shorthand=false
3 |
4 | var x = 42;
5 | var object = {x};
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectInitialiserShorthand/Error_Keyword.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | var object = {var};
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectInitialiserShorthand/Error_MissingVar.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: missingVarObjectInitialiserShorthand is not defined
3 |
4 | var object = {missingVarObjectInitialiserShorthand};
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectInitialiserShorthand/Ok.js:
--------------------------------------------------------------------------------
1 | var x = 42;
2 | var y = 43;
3 | var object = {x, y};
4 |
5 | // ----------------------------------------------------------------------------
6 |
7 | assert.equal(42, object.x);
8 | assert.equal(43, object.y);
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/ObjectMixin.js:
--------------------------------------------------------------------------------
1 | var target = {a: 0, b: 2};
2 | var source = {a: 1, c: 3, get d() { return this.b || this.a + 64; }};
3 | var mixed = Object.mixin(target, source);
4 |
5 | // ----------------------------------------------------------------------------
6 |
7 | assert.isTrue(Object.hasOwnProperty("mixin"));
8 | assert.equal(mixed.a, source.a);
9 | assert.equal(mixed.b, target.b);
10 | assert.equal(mixed.c, source.c);
11 | assert.notEqual(mixed.d, source.d);
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Promise.js:
--------------------------------------------------------------------------------
1 | // Async.
2 |
3 | var p = new Promise((resolve, reject) => {
4 | resolve(42);
5 | });
6 | p.then((v) => {
7 | assert.equal(v, 42);
8 | done();
9 | });
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/PromiseThrowInResolve.js:
--------------------------------------------------------------------------------
1 | // Async.
2 |
3 | var message = 'testing';
4 | var throwInResolve = new Promise((resolve, reject) => {
5 | resolve(42);
6 | });
7 | throwInResolve.then((v) => {
8 | throw new Error(message);
9 | }).catch(function(ex) {
10 | // When catch() is used in testing, these asserts would
11 | // not be called, just the done() to avoid timeout.
12 | assert(ex instanceof Error);
13 | assert(ex.toString().indexOf(message) !== -1);
14 | done(ex);
15 | }).catch(done);
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/PropertyMethodAssignment/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --property-methods=false
3 |
4 | var object = {
5 | method() {
6 | return 42;
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/PropertyMethodAssignment/Error_NotNamed.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | var object = {
4 | "notNamedField"() {
5 | return notNamedField;
6 | }
7 | };
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Rest/Error_NotLast.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:46: ')' expected
3 |
4 | function invalidParam(noDefault, ...restParam, noRestAgain) {
5 | // Should fail to parse since non rest param is not allowed after
6 | // param.
7 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Rest/Error_SetAccessor.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:9: 'identifier' expected
3 |
4 | var object = {
5 | set x(...rest) {
6 | // rest is not allowed for set accessor
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Rest/Simple.js:
--------------------------------------------------------------------------------
1 | function f(...p) {
2 | return p;
3 | }
4 |
5 | function g(a, ...p) {
6 | return p;
7 | }
8 |
9 | assertArrayEquals([], f());
10 | assertArrayEquals([0], f(0));
11 | assertArrayEquals([0, 1], f(0, 1));
12 |
13 | assertArrayEquals([], g());
14 | assertArrayEquals([], g(0));
15 | assertArrayEquals([1], g(0, 1));
16 | assertArrayEquals([1, 2], g(0, 1, 2));
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Rest/Strict.js:
--------------------------------------------------------------------------------
1 | function f(...xs) {
2 | 'use strict';
3 | return this;
4 | }
5 |
6 | assert.isUndefined(f());
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding10.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function f() {
4 | return 'outer';
5 | }
6 |
7 | {
8 | var f = function f() {
9 | return 'inner';
10 | };
11 |
12 | assert.equal('inner', f());
13 | }
14 |
15 | assert.equal('inner', f());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding11.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let result = [];
4 | let obj = {a : 'hello a', b : 'hello b', c : 'hello c' };
5 | let keys = Object.keys(obj);
6 |
7 | // NOTE: Do not fix the deviation from Google JS coding style. This was done in
8 | // order to check codegen for single statements in the body of 'for' loops.
9 | for (let i = 0; i < keys.length; i++)
10 | result.push(
11 | function() { return obj[keys[i]]; }
12 | );
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | assert.equal('hello a', result[0]());
17 | assert.equal('hello b', result[1]());
18 | assert.equal('hello c', result[2]());
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding2.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let result = [];
4 | let obj = {a : 'hello a', b : 'hello b', c : 'hello c' };
5 | for (let x in obj) {
6 | result.push(
7 | function() { return obj[x]; }
8 | );
9 | }
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | assert.equal('hello a', result[0]());
14 | assert.equal('hello b', result[1]());
15 | assert.equal('hello c', result[2]());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding3.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var f1, f2;
4 |
5 | {
6 | let z = 'z1 value';
7 | f1 = function() { return z; };
8 | }
9 | {
10 | let z = 'z2 value';
11 | f2 = function() { return z; };
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
16 | assert.equal('z1 value', f1());
17 | assert.equal('z2 value', f2());
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding4.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let result = [];
4 | for (let a = 1; a < 3; a++) {
5 | result.push(
6 | function() { return 'for ' + a; }
7 | );
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
12 | assert.equal('for 1', result[0]());
13 | assert.equal('for 2', result[1]());
14 | assert.equal(2, result.length);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding5.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let result = [];
4 | for (let i = 1; i < 3; i ++) {
5 | for (let j = 9; j > 7; j --) {
6 | result.push(
7 | function() { return i + ':' + j; }
8 | );
9 | }
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | assert.equal('1:9', result[0]());
15 | assert.equal('1:8', result[1]());
16 | assert.equal('2:9', result[2]());
17 | assert.equal('2:8', result[3]());
18 | assert.equal(4, result.length);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding6.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function testBlock() {
4 | // Test function expressions.
5 | {
6 | var x = function g() { return 'g'; } || function h() { return 'h'; };
7 | return x;
8 | }
9 | }
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | var result = testBlock();
14 | assert.equal('g', result());
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding7.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function blockTest() {
4 | {
5 | let x = 'let x value';
6 | function g() {
7 | return x;
8 | }
9 | return g;
10 | }
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
15 | assert.equal('let x value', blockTest()());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding8.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function f() {
4 | return 'outer';
5 | }
6 |
7 | {
8 | function f() {
9 | return 'inner';
10 | }
11 |
12 | assert.equal('inner', f());
13 | }
14 |
15 | assert.equal('outer', f());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/BlockBinding9.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function f() {
4 | return 'outer';
5 | }
6 |
7 | {
8 | (function f() {
9 | return 'inner';
10 | });
11 |
12 | assert.equal('outer', f());
13 | }
14 |
15 | assert.equal('outer', f());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/DeconstructingBlockBinding.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | if (true) {
4 | let [a,b] = [1,2];
5 | const [c,d] = [4,5];
6 | }
7 | if (true) {
8 | let {x: [{e}, f], g} = {x: [{e:4}, 5], g: 6};
9 | const a = 0, [b, {c, x: [d]}] = [1, {c: 2, x: [3]}];
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/DeepNestedLet.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var a = 'var a';
4 | {
5 | var b = 'var b';
6 | {
7 | var c = 'var c';
8 | let d = 'let d';
9 | }
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/DeepNestedLetConst.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var a = 'var a';
4 | {
5 | var b = 'var b';
6 | {
7 | let c = 'let c';
8 | {
9 | const d = 'const d';
10 | }
11 | }
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/DeepNestedLetVar.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var a = 'var a';
4 | {
5 | var b = 'var b';
6 | {
7 | let c = 'let c';
8 | {
9 | var d = 'var d';
10 | }
11 | }
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/DeepNestedLetVarNoInit.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var var_a;
4 | {
5 | var var_b;
6 | {
7 | let let_c = 'let c';
8 | {
9 | var var_d;
10 | }
11 | }
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_BlockBinding1.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 | // Error: inner is not defined
4 |
5 | function testBlock() {
6 | {
7 | let inner = 'inner value';
8 | }
9 |
10 | var x = inner;
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ConstMissingInitializer.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | const x = 1, y; // Missing initialiser!
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding=false
3 |
4 | {
5 | let x = 42;
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForInWithInitializerConst.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 | // Error: let/const in for-in statement may not have initialiser
4 |
5 | for (const i = 0 in {}) {
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForInWithInitializerLet.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | for (let i = 0 in {}) {
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForOfWithInitializerConst.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | function* gen() {
5 | yield 1;
6 | }
7 |
8 | for (const i = 0 of gen()) {
9 | }
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForOfWithInitializerLet.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | function* gen() {
5 | yield 1;
6 | }
7 |
8 | for (let i = 0 of gen()) {
9 | }
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForOfWithInitializerVar.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | function* gen() {
5 | yield 1;
6 | }
7 |
8 | for (var i = 0 of gen()) {
9 | }
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_ForWithoutInitializerConst.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 |
4 | var i = 0;
5 | for (const x; i < 3; i++) {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/Error_FunctionExpressionInBlock.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --block-binding
3 | // Error: functionExpression is not defined
4 |
5 | {
6 | (function functionExpression() {
7 | return 'inner';
8 | });
9 |
10 | functionExpression; // function expression doesn't add name to the scope.
11 | }
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/ForInWithInitializerVar.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var x = 0;
4 |
5 | // ES5 allows this.
6 | for (var i = (x = 1) in {}) {
7 | }
8 |
9 | assert.equal(1, x);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetForInInitializers1.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var result;
4 | {
5 | let let_result = [];
6 | let let_array = ['one', 'two', 'three'];
7 | for (var index = 1 in let_array) {
8 | let let_index = index;
9 | let let_value = let_array[let_index];
10 | let_result.push(
11 | function() {
12 | return [let_index, let_value];
13 | });
14 | }
15 | result = let_result;
16 | }
17 |
18 | // ----------------------------------------------------------------------------
19 |
20 | assertArrayEquals(['0', 'one'], result[0]());
21 | assertArrayEquals(['1', 'two'], result[1]());
22 | assertArrayEquals(['2', 'three'], result[2]());
23 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetForInitializers1.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var result;
4 | {
5 | let let_x = 'let x';
6 | let let_l = [];
7 | for (var var_x = 1, var_y = 2, var_z = 3; var_x < 10; var_x ++) {
8 | let l_x = var_x, l_y = var_y, l_z = var_z;
9 | let_l.push( function() { return [ l_x, l_y, l_z ]; } );
10 | }
11 | result = let_l;
12 | }
13 |
14 | // ----------------------------------------------------------------------------
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInClass.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | class LetInClass {
4 | get z() {
5 | let let_z = 10;
6 | return let_z;
7 | }
8 |
9 | set z(v) {
10 | let let_zv = v;
11 | }
12 |
13 | distance() {
14 | let dist = this.y - this.x;
15 | return dist;
16 | }
17 | }
18 |
19 | // ----------------------------------------------------------------------------
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInClosure.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function letInClosure(n) {
4 | var l = [];
5 | for (var i = 0; i < n; i ++) {
6 | let let_i = i;
7 | if (i % 3 == 0) {
8 | continue;
9 | }
10 | l.push(function() {
11 | return let_i;
12 | });
13 | }
14 | return l;
15 | }
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | var result = letInClosure(10);
20 | assert.equal(1, result[0]());
21 | assert.equal(2, result[1]());
22 | assert.equal(4, result[2]());
23 | assert.equal(5, result[3]());
24 | assert.equal(7, result[4]());
25 | assert.equal(8, result[5]());
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInFor.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x ++) {
4 | let y = 'let y';
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForBreak.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x ++) {
4 | let y = 'let y';
5 | if (x % 2 == 0) {
6 | break;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForBreakInner.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x ++) {
4 | for (var y = 0; y < 10; y ++) {
5 | let z = 'let z';
6 | if (x == 7) {
7 | break;
8 | }
9 | }
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForBreakNamed.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | outer:
4 | for (var x = 0; x < 10; x ++) {
5 | for (var y = 0; y < 10; y ++) {
6 | let z = 'let z';
7 | if (x == 7) {
8 | break outer;
9 | }
10 | }
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForContinue.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x ++) {
4 | let y = 'let y';
5 | if (x % 2 == 0) {
6 | continue;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForContinueInner.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x ++) {
4 | for (var y = 0; y < 10; y ++) {
5 | let z = 'let z';
6 | if (x == 7) {
7 | continue;
8 | }
9 | }
10 | }
11 |
12 | // ----------------------------------------------------------------------------
13 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInForContinueNamed.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | outer:
4 | for (var x = 0; x < 10; x ++) {
5 | for (var y = 0; y < 10; y ++) {
6 | let z = 'let z';
7 | if (x == 7) {
8 | continue outer;
9 | }
10 | }
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInProperties.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var object = {
4 | get x() {
5 | while (true) {
6 | let let_x = 'let x';
7 | return let_x;
8 | }
9 | },
10 |
11 | set x(v) {
12 | do {
13 | let let_v = v;
14 | this.v = let_v;
15 | } while (false);
16 | }
17 | }
18 |
19 | // ----------------------------------------------------------------------------
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInitializerFor1.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (let x = 1; x < 10; x++) {
4 | x;
5 | }
6 |
7 | // ----------------------------------------------------------------------------
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInitializerFor2.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (let x = 1, y = 2, z = 3; x < 10; x ++) {
4 | y++;
5 | z++;
6 | }
7 |
8 | // ----------------------------------------------------------------------------
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInitializerFor3.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (let x = 1, y = x + 1; x < 10 && y != 0; x ++, y *= 2) {
4 | if (y > 300) {
5 | continue;
6 | }
7 | }
8 |
9 | // ----------------------------------------------------------------------------
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetInitializerForIn.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let sum = 0;
4 | let a = [1,2,3];
5 | for (let x in a) {
6 | sum = sum + a[x];
7 | }
8 |
9 | // ----------------------------------------------------------------------------
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetNoInitializer.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var x = 1;
4 | {
5 | let x;
6 | assert.equal(undefined, x);
7 | x = 2;
8 | assert.equal(2, x);
9 | }
10 | assert.equal(1, x);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetNoInitializerGlobal.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let x2;
4 | assert.equal(undefined, x2);
5 | x2 = 2;
6 | assert.equal(2, x2);
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetWithFor.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x = 0; x < 10; x++) {
4 | let let_y = 'let y';
5 | for (var for_z = 0; for_z < 2; for_z ++) {
6 | break;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetWithForIn.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var x in [1,2,3]) {
4 | let let_y = x;
5 | for (var for_in_z in [4,5,6]) {
6 | continue;
7 | }
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetWithSwitch.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var i = 0; i < 5; i ++) {
4 | let let_x = 'let x';
5 |
6 | switch (i) {
7 | case 0:
8 | break;
9 | case 2:
10 | break;
11 | default:
12 | break;
13 | }
14 | }
15 |
16 | // ----------------------------------------------------------------------------
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/LetWithSwitch2.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | for (var i = 0; i < 5; i ++) {
4 | let let_x = 'let x';
5 |
6 | switch (i) {
7 | case 0:
8 | continue;
9 | case 2:
10 | break;
11 | default:
12 | break;
13 | }
14 | }
15 |
16 | // ----------------------------------------------------------------------------
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/NameBindingInFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | {
4 | function f() {
5 | return f;
6 | }
7 | var g = f;
8 | f = 42;
9 | assert.equal(42, g());
10 | }
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/NestedFunction1.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function nestedFunction1() {
4 | return function() {
5 | let let_x = 'let x';
6 | }
7 | }
8 |
9 | // ----------------------------------------------------------------------------
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/NestedFunction2.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function nestedFunction2() {
4 | let let_func = function() {
5 | let let_x = 'let x';
6 | }
7 | return let_func;
8 | }
9 |
10 | // ----------------------------------------------------------------------------
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/NestedFunction3.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | function nestedFunction3() {
4 | let let_x = 'let x';
5 | function function_foo() { }
6 | }
7 |
8 | // ----------------------------------------------------------------------------
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/NestedLet.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | var x = 'var';
4 | {
5 | let y = 'let 1';
6 | }
7 | {
8 | let y = 'let 2';
9 | }
10 |
11 | // ----------------------------------------------------------------------------
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/TopLevelLet.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let x = 'let';
4 |
5 | // ----------------------------------------------------------------------------
6 |
7 | assert.equal(x, 'let');
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/TopLevelLetConst.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let x = 'let';
4 | const y = 'const';
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | assert.equal('let', x);
9 | assert.equal('const', y);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Scope/TopLevelLetVar.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | let x = 'let';
4 | var y = 'var';
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | assert.equal('let', x);
9 | assert.equal('var', y);
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/Array.js:
--------------------------------------------------------------------------------
1 | var a = [];
2 | var b = [0, ...a];
3 | var c = [...b, ...b];
4 | var d;
5 | var e = [0, ...d = [1, 2], 3];
6 | var f = [0, ...[[1, 2], [3, 4]], 5];
7 |
8 | // ----------------------------------------------------------------------------
9 |
10 | assertArrayEquals([0], b);
11 | assertArrayEquals([0, 0], c);
12 | assertArrayEquals([1, 2], d);
13 | assertArrayEquals([0, 1, 2, 3], e);
14 | assertArrayEquals([0, [1, 2], [3, 4], 5], f);
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/Call.js:
--------------------------------------------------------------------------------
1 | function f(...args) {
2 | return args;
3 | }
4 | var result = f(0, ...[1, 2], 3);
5 |
6 | // ----------------------------------------------------------------------------
7 |
8 | assertArrayEquals([0, 1, 2, 3], result);
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/CallWithUndefined.js:
--------------------------------------------------------------------------------
1 | function f(...args) {
2 | return args;
3 | }
4 |
5 | assert.throw(function() {
6 | // Should throw due to ToObject(undefined)
7 | f(0, ...undefined, 1);
8 | }, TypeError)
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/Class.js:
--------------------------------------------------------------------------------
1 | class SpreadTestClass {
2 | constructor(x, y) {
3 | this.SpreadTestClass = SpreadTestClass;
4 | this.self = this;
5 | this.x = x;
6 | this.y = y;
7 | }
8 | }
9 |
10 | var object = new SpreadTestClass(...[0, 1]);
11 |
12 | // ----------------------------------------------------------------------------
13 |
14 | assert.equal(object.x, 0);
15 | assert.equal(object.y, 1);
16 | assert.equal(object.self, object);
17 | assert.isTrue(object instanceof object.SpreadTestClass);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --spread=false
3 |
4 | [0, 1, ...[2, 3]];
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/MethodCall.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | method: function(...args) {
3 | return {
4 | self: this,
5 | args: args
6 | };
7 | }
8 | };
9 |
10 | var result = {
11 | obj: obj,
12 | result: obj.method(0, ...[1, 2], 3)
13 | };
14 |
15 | // ----------------------------------------------------------------------------
16 |
17 | assert.equal(result.obj, result.result.self);
18 | assertArrayEquals([0, 1, 2, 3], result.result.args);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/MethodCallQuotedName.js:
--------------------------------------------------------------------------------
1 | var obj = {
2 | method: function(...args) {
3 | return {
4 | self: this,
5 | args: args
6 | };
7 | }
8 | };
9 |
10 | var result = {
11 | obj: obj,
12 | result: obj['meth' + 'od'](0, ...[1, 2], 3)
13 | };
14 |
15 | // ----------------------------------------------------------------------------
16 |
17 | assert.equal(result.obj, result.result.self);
18 | assertArrayEquals([0, 1, 2, 3], result.result.args);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/New.js:
--------------------------------------------------------------------------------
1 | function F(x, y, z) {
2 | this.x = x;
3 | this.y = y;
4 | this.z = z;
5 | this.self = this;
6 | this.F = F;
7 | }
8 |
9 | var object = new F(0, ...[1, 2]);
10 |
11 | // ----------------------------------------------------------------------------
12 |
13 | assert.equal(0, object.x);
14 | assert.equal(1, object.y);
15 | assert.equal(2, object.z);
16 | assert.equal(object, object.self);
17 | assert.isTrue(object instanceof object.F);
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/New2.js:
--------------------------------------------------------------------------------
1 | function G() {}
2 |
3 | function F(x, y, z) {
4 | var obj = new G;
5 | obj.x = x;
6 | obj.y = y;
7 | obj.z = z;
8 | obj.f = this;
9 | obj.G = G;
10 | obj.F = F;
11 | return obj;
12 | }
13 |
14 | var object = new F(0, ...[1, 2]);
15 |
16 | // ----------------------------------------------------------------------------
17 |
18 | assert.equal(0, object.x);
19 | assert.equal(1, object.y);
20 | assert.equal(2, object.z);
21 | assert.isFalse(object instanceof object.F);
22 | assert.isTrue(object instanceof object.G);
23 | assert.isTrue(object.f instanceof object.F);
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/NewBuiltin.js:
--------------------------------------------------------------------------------
1 | var d = new Date(...[2011, 4, 3]);
2 |
3 | // ----------------------------------------------------------------------------
4 |
5 | assert.equal(2011, d.getFullYear());
6 | assert.equal(4, d.getMonth());
7 | assert.equal(3, d.getDate());
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Spread/Type.js:
--------------------------------------------------------------------------------
1 |
2 | assertArrayEquals([0, 1], [0, ...{}, 1]);
3 | assertArrayEquals([0, 1, 2, 3], [0, ...{0: 1, 1: 2, length: 2}, 3]);
4 | assertArrayEquals([0, 'a', 'b', 'c', 1],[0, ...'abc', 1]);
5 | assertArrayEquals([0, 'a', 'b', 'c', 1], [0, ... new String('abc'), 1]);
6 | assertArrayEquals([0, 1], [0, ...true, 1]);
7 | assertArrayEquals([0, 1],[0, ...1, 1]);
8 | assertArrayEquals([0, 1],[0, ...function() {}, 1]);
9 | assertArrayEquals([0, undefined, undefined, 1],[0, ...function(x, y) {}, 1]);
10 | assertArrayEquals([0, 1],[0, ...{}, 1]);
11 |
12 | assert.throw(function() {
13 | [0, ...null, 1];
14 | }, TypeError);
15 |
16 | assert.throw(function() {
17 | [0, ...undefined, 1];
18 | }, TypeError);
19 |
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Symbol/GetOwnPropertySymbols.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 |
3 | var s1 = Symbol();
4 | var s2 = Symbol();
5 | var object = {a: 'a'};
6 | object[s1] = 's1';
7 | object.b = 'b';
8 | object[s2] = 's2';
9 | assertArrayEquals([s1, s2], Object.getOwnPropertySymbols(object));
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Symbol/Inherited.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 |
3 | var s = Symbol();
4 | var p = {};
5 | Object.defineProperty(p, s, {
6 | get: function() {
7 | return 42;
8 | },
9 | configurable: true
10 | });
11 |
12 | var o = Object.create(p);
13 | assert.equal(42, o[s]);
14 | assert.throws(function() {
15 | o[s] = 1;
16 | }, TypeError);
17 |
18 | var val;
19 | Object.defineProperty(p, s, {
20 | set: function(v) {
21 | val = v;
22 | },
23 | configurable: true
24 | });
25 |
26 | o[s] = 33;
27 | assert.equal(33, val);
28 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Symbol/Object.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 |
3 | var s = Symbol();
4 | var object = {};
5 | object[s] = 42;
6 | assert.equal(42, object[s]);
7 | assert.isUndefined(object[n + '']);
8 | assertArrayEquals([], Object.getOwnPropertyNames(object));
9 | assert.isTrue(object.hasOwnProperty(s));
10 |
11 | assert.equal(32, object[s] -= 10);
12 | assert.equal(16, object[s] /= 2);
13 | assert.equal(16, object[s]);
14 |
15 | var n = Symbol();
16 | assert.equal(object[n] = 1, 1);
17 | assert.equal(object[n] += 2, 3);
18 |
19 | assert.isFalse(Object.getOwnPropertyDescriptor(object, n).enumerable);
20 |
21 | assert.isTrue(n in object);
22 | assert.isTrue(delete object[n]);
23 | assert.isFalse(n in object);
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Symbol/ObjectModel.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols
2 |
3 | var s = Symbol('s');
4 | assert.equal(typeof s, 'symbol');
5 | assert.equal(s.constructor, Symbol);
6 | assert.isFalse(s instanceof Symbol);
7 |
8 | assert.throws(() => {
9 | new Symbol;
10 | });
11 |
12 | assert.equal(s.toString(), 'Symbol(s)');
13 | assert.equal(s.valueOf(), s);
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Symbol/TransformationOff.js:
--------------------------------------------------------------------------------
1 | // Options: --symbols=false
2 |
3 | var s = Symbol();
4 | var s2 = Symbol();
5 | var object = {};
6 | object[s] = 1;
7 | object[s2] = 2;
8 |
9 | assert.equal(object[s], 1);
10 | assert.equal(object[s2], 2);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/ArrayWithHoles.js:
--------------------------------------------------------------------------------
1 | var arr = [,1, ,3,];
2 | assert.equal(4, arr.length);
3 |
4 | var arr2 = [,1, ,...[3],];
5 | assert.equal(4, arr.length);
6 |
7 | var x, y;
8 | [x, , y] = [0, 1, 2];
9 | assert.equal(0, x);
10 | assert.equal(2, y);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Empty.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/test/feature/Syntax/Empty.js
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_Arguments.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :7:6: Unexpected token )
3 |
4 | function f(x) {
5 | }
6 |
7 | f(x, );
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_FunctionParam.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 'identifier' expected
3 |
4 | function f(x,) {
5 | return x;
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_NoLineTerminatorPostfix.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 7:7: Unexpected token ;
3 |
4 | function f(x) {
5 | var x = 0;
6 | x
7 | ++;
8 | }
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_RegExpNotClosed.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:2: Expected '/' in regular expression literal
3 |
4 | /
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_StrictKeywordsInArguments.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:25: implements is a reserved identifier
3 |
4 | function testImplements(implements) {
5 | 'use strict';
6 | return 42;
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_StrictKeywordsInArgumentsPattern.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:26: implements is a reserved identifier
3 |
4 | function testImplements({implements}) {
5 | 'use strict';
6 | return 42;
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_StrictKeywordsInPropertyDefinitionIdentifierReference.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :6:11: yield is a reserved identifier
3 |
4 | function testStrictKeywordsInPropertyDefinitionIdentifierReference() {
5 | 'use strict';
6 | return {yield};
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_StrictKeywordsInStrict.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :5:26: implements is a reserved identifier
3 |
4 | 'use strict';
5 | function testImplements({implements}) {
6 | return 42;
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_UnicodeEscapeSequenceInName.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :4:5: Character code '48' is not a valid identifier start char
3 |
4 | var \u0030ab = 42; // 0ab
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_WithInClass.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 6:5: Strict mode code may not include a with statement
3 |
4 | class C {
5 | method() {
6 | with ({}) {}
7 | }
8 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_WithInModule.module.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 4:1: Strict mode code may not include a with statement
3 |
4 | with ({}) {}
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_WithInStrictFunction.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 7:3: Strict mode code may not include a with statement
3 |
4 | function testWithInStrict() {
5 | 'use foo';
6 | 'use strict';
7 | with ({}) {}
8 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_WithInStrictProgram.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: 6:1: Strict mode code may not include a with statement
3 |
4 | 'use foo';
5 | 'use strict';
6 | with ({}) {}
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/Error_YieldStarNewLine.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Error: :6:7: Unexpected token *
3 |
4 | function* yieldStarNewLine() {
5 | yield
6 | *42;
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/ExpressionValidation.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // test MemberLookupExpression
4 | function f(a) {
5 | var b = [42];
6 | return (a||b)[0];
7 | }
8 |
9 | assert.equal(42, f(null));
10 | assert.equal(43, f([43]));
11 |
12 | // test NewExpression
13 | var a, b = function() { this.ans = 42; };
14 | assert.equal(new (a||b)().ans, 42);
15 |
16 | a = function() { this.ans = 43; };
17 | assert.equal(new (a||b)().ans, 43);
18 |
19 | // test CallExpression
20 | a = undefined;
21 | b = function() { return 42; }
22 | assert.equal((a||b)(), 42);
23 |
24 | a = function() { return 43; }
25 | assert.equal((a||b)(), 43);
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/ImplicitSemiColon.js:
--------------------------------------------------------------------------------
1 | function f() {
2 | return
3 | 42;
4 | }
5 |
6 | assert.isUndefined(f());
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/NumberLiteralMemberExpression.js:
--------------------------------------------------------------------------------
1 | assert.equal(1 .toString(), '1');
2 | assert.equal(1.1.toString(), '1.1');
3 | assert.equal(1e1.toString(), '10');
4 | assert.equal(1E1.toString(), '10');
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/RegularExpression.js:
--------------------------------------------------------------------------------
1 | var re1 = /a*b/;
2 | var re2 = /=a+/;
3 | var re3 = /\//;
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/StringEscapes.js:
--------------------------------------------------------------------------------
1 | var o1 = {
2 | '\\\'': 42,
3 | '\0\b\f\n\r\t\v\x42\u1234': 1234
4 | };
5 | var o2 = {
6 | '\\\'\
7 | ': 42,
8 | '\0\b\f\n\r\t\v\x42\u1234': 1234
9 | };
10 |
11 | assertArrayEquals(Object.keys(o1), Object.keys(o2));
12 | assert.equal(42, o1['\\\'']);
13 | assert.equal(42, o2['\\\'']);
14 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/UnicodeEscapeSequenceInName.js:
--------------------------------------------------------------------------------
1 | var a\u0062c = 1;
2 | assert.equal(1, abc);
3 |
4 | var λ = 2;
5 | assert.equal(2, \u03bb);
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/UseStrictEscapeSequence.js:
--------------------------------------------------------------------------------
1 | function testUseStrictEscapeSequence() {
2 | 'use str\x69ct';
3 | return this;
4 | }
5 |
6 | assert.notEqual(testUseStrictEscapeSequence(), undefined);
7 |
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/UseStrictLineContinuation.js:
--------------------------------------------------------------------------------
1 | function testUseStrictLineContinuation() {
2 | 'use \
3 | strict';
4 | return this;
5 | }
6 |
7 | assert.notEqual(testUseStrictLineContinuation(), undefined);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Syntax/null.js:
--------------------------------------------------------------------------------
1 | null
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TempVarTransformer/UseStrictDirective.js:
--------------------------------------------------------------------------------
1 | // This test depends on it running in non strict mode.
2 | assert.isTrue(function() { return this; }() !== undefined);
3 |
4 | function f() {
5 | 'use strict';
6 | var xs = 'abc';
7 | var o = {
8 | f() {
9 | return this;
10 | }
11 | };
12 | o.f(...xs);
13 | return (1, o.f)();
14 | }
15 |
16 | assert.isUndefined(f());
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/CallExpression.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | {
4 | let i = 0, called = 0;
5 | function f() {
6 | called++;
7 | return function() {
8 | return ++i;
9 | };
10 | }
11 |
12 | assert.equal(1, f() `whatevs`);
13 | assert.equal(1, called);
14 | assert.equal(2, f `abc` `def`);
15 | assert.equal(2, called);
16 | assert.equal(3, f `ghi` ());
17 | assert.equal(3, called);
18 | }
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/CommaExpression.js:
--------------------------------------------------------------------------------
1 | assert.equal('24', `${ 1, 2 }${ 3, 4 }`);
2 | assert.equal('6', `${ 5, 6 }`);
3 |
4 | function templateLiteralCommaTest(callsite, x, y) {
5 | assert.equal(2, x);
6 | assert.equal(4, y);
7 | return x + y;
8 | }
9 |
10 | assert.equal(6, templateLiteralCommaTest`${ 1, 2 }${ 3, 4 }`);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --template-literals=false
3 | // Error: :5:1: Unexpected token `
4 |
5 | `abc`;
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/Error_InvalidSubstitution.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | function f() {}
4 |
5 | f`a${ `
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/Error_InvalidSubstitution2.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | function f() {}
4 |
5 | f`a${ }`
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/Error_NotClosed.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | function f() {}
4 |
5 | f`not closed \`
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/InBlock.js:
--------------------------------------------------------------------------------
1 | // This just tests that we do not get any compile errors.
2 |
3 | {
4 | `abc`
5 | }
6 |
7 | (function() {
8 | `def`
9 | });
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/InModule.js:
--------------------------------------------------------------------------------
1 | module m from './resources/m';
2 | module n from './resources/n';
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/MemberExpression.js:
--------------------------------------------------------------------------------
1 | // Options: --block-binding
2 |
3 | {
4 | let a = [function() {
5 | return 1;
6 | }];
7 |
8 | assert.equal(1, a[0] `whatevs`);
9 |
10 | function f() {
11 | return [function() {
12 | return 2;
13 | }];
14 | }
15 |
16 | assert.equal(2, f `abc` [0] `def`);
17 |
18 | let o = {
19 | g: function() {
20 | return 3;
21 | }
22 | };
23 |
24 | assert.equal(3, o.g `ghi`);
25 | }
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/Strict.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | function f(...args) {
4 | return this;
5 | }
6 |
7 | assert.equal(undefined, f `a`);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/StringRaw.js:
--------------------------------------------------------------------------------
1 | assert.equal('', String.raw ``);
2 | assert.equal('\n', String.raw `
3 | `);
4 | assert.equal('\\n', String.raw `\n`);
5 | assert.equal('\\n42\\t', String.raw `\n${ 40 + 2 }\t`);
6 | assert.equal('\n42\t', String.raw `
7 | ${42} `);
8 | assert.equal('\\\n42\\\n', String.raw `\
9 | ${42}\
10 | `);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/resources/f.js:
--------------------------------------------------------------------------------
1 | export function f(...args) {
2 | return args;
3 | }
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/resources/m.js:
--------------------------------------------------------------------------------
1 | import {f} from './f';
2 |
3 | assert.equal('a', (f `a`)[0][0]);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TemplateLiterals/resources/n.js:
--------------------------------------------------------------------------------
1 | import {f} from './f';
2 |
3 | assert.equal('b', (f `b`)[0][0]);
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Tools/FreeVariableChecker.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --freeVariableChecker
3 | try {
4 | var y = xxx;
5 | } catch (e) {}
6 | // test/unit/semantics/freeVariableChecker.traceur.js checks operation
7 | // of the checker, here we check that the option works in the compiler.
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/DefaultParam.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions --type-assertion-module=./resources/assert
2 | function initialized(a:Number = 1) { return a; }
3 |
4 | assert.equal(1, initialized());
5 | assert.equal(2, initialized(2));
6 | assert.throw(() => { initialized(''); }, chai.AssertionError);
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/ExportedFunction.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions
2 | import {exportedParamAndReturn} from './resources/exported-function';
3 |
4 | assert.equal(1, exportedParamAndReturn(1));
5 |
6 | assert.throw(() => { exportedParamAndReturn(''); }, chai.AssertionError);
7 | assert.throw(() => { exportedParamAndReturn(0); }, chai.AssertionError);
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/FunctionParams.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions --type-assertion-module=./resources/assert
2 | function single(a:Number) {}
3 | function multiple(a:Number, b:Boolean) {}
4 | function untyped(a) {}
5 | function onlySome(a, b:Number) {}
6 |
7 | single(1);
8 | multiple(1, true);
9 | untyped();
10 | onlySome(null, 1);
11 |
12 | assert.throw(() => { single(''); }, chai.AssertionError);
13 | assert.throw(() => { multiple('', false); }, chai.AssertionError);
14 | assert.throw(() => { multiple(false, 1); }, chai.AssertionError);
15 | assert.throw(() => { multiple(1, ''); }, chai.AssertionError);
16 | assert.throw(() => { onlySome(1, true); }, chai.AssertionError);
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/NestedFunctionDefaultParam.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions --type-assertion-module=./resources/assert
2 | function f(value:String, a:Function = function():Function {
3 | // body of default param expression
4 | return function (x:String):Number {
5 | if (x === 'invalid')
6 | return x;
7 | return x.length;
8 | };
9 | }) {
10 | return a()(value);
11 | }
12 |
13 | assert.equal(5, f('hello'));
14 | assert.equal(10, f('hello', () => { return () => { return 10; }}));
15 |
16 | assert.throw(() => { f(1); }, chai.AssertionError);
17 | assert.throw(() => { f('hello', 1); }, chai.AssertionError);
18 | assert.throw(() => { f('invalid'); }, chai.AssertionError);
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/PrimitiveValueTypes.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions --type-assertion-module=./resources/assert
2 |
3 | function foo(a: string): boolean {
4 | var x: number = 1;
5 | return true;
6 | }
7 |
8 | function failReturn(): number {
9 | return 'str';
10 | }
11 |
12 | function failVariable() {
13 | var x: string = true;
14 | }
15 |
16 |
17 | foo('bar');
18 | assert.throw(() => { foo(123) }, chai.AssertionError);
19 | assert.throw(() => { failReturn() }, chai.AssertionError);
20 | assert.throw(() => { failVariable() }, chai.AssertionError);
21 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/Variables.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --type-assertions --type-assertion-module=./resources/assert
2 | var globalVar:Number = 1;
3 | var globalUninitializedVar:Number;
4 |
5 | function variableTypes() {
6 | var x:Number = 1;
7 | var y:Number;
8 | var a:Number, b:Number;
9 | var c:Number = 1, d:Number = 2, e:String = 'test';
10 | }
11 |
12 | function throwsAssertion(value) {
13 | var x:Number = value;
14 | }
15 |
16 | assert.throw(() => { throwsAssertion('test'); }, chai.AssertionError);
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/TypeAssertions/resources/exported-function.js:
--------------------------------------------------------------------------------
1 | import {assert} from './assert'
2 | export function exportedParamAndReturn(a:Number):Number {
3 | return a === 0 ? 'invalid' : a;
4 | }
5 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Types/TypeAnnotations.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true --annotations=true
2 |
3 | class Test {}
4 |
5 | function abc(x: Test) : Test {
6 | var a : Test = new Test();
7 | }
8 |
9 | function xyz(x: number, y: boolean): string {}
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Types/TypeSyntax.js:
--------------------------------------------------------------------------------
1 | // Options: --types=true
2 |
3 | var a : any;
4 | var b : bool;
5 | var s : string;
6 | var v : void;
7 | var n : number;
8 |
9 | var named : namespace.type;
10 |
11 | class Test {}
12 |
13 | function abc(x : Test) : Test {
14 | var a : Test = new Test();
15 | }
16 |
17 | function xyz({x, y} : Test) {}
18 |
19 | var x = function (a : Test) : Test {}
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Arguments.js:
--------------------------------------------------------------------------------
1 | function* f() {
2 | yield [arguments[0], arguments[1]];
3 | }
4 |
5 | for (var arr of f(1, 2)) {
6 | assert.equal(1, arr[0]);
7 | assert.equal(2, arr[1]);
8 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/BinaryOperator.js:
--------------------------------------------------------------------------------
1 | function* f(x) {
2 | var a = (yield x) + (yield x + 1);
3 | return a;
4 | }
5 |
6 | var g = f(1);
7 | assert.deepEqual(g.next(), {value: 1, done: false});
8 | assert.deepEqual(g.next(1), {value: 2, done: false});
9 | assert.deepEqual(g.next(2), {value: 3, done: true});
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/CommaOperator.js:
--------------------------------------------------------------------------------
1 | function* f(x, y) {
2 | yield x, yield y;
3 | return x + y;
4 | }
5 |
6 | var g = f(1, 2);
7 | assert.deepEqual(g.next(), {value: 1, done: false});
8 | assert.deepEqual(g.next(1), {value: 2, done: false});
9 | assert.deepEqual(g.next(2), {value: 3, done: true});
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Continue.js:
--------------------------------------------------------------------------------
1 | var x = ':';
2 |
3 | function* f() {
4 | yield 1;
5 | var j = 0;
6 | label1: for (var i = 0; i < 3; i++) {
7 | x += 'i:' + i;
8 | x += 'j:' + j;
9 | if (j++ > 4) return;
10 | continue label1;
11 | x += 'x';
12 | }
13 | }
14 |
15 | var g = f();
16 | assert.deepEqual(g.next(), {value: 1, done: false});
17 | assert.deepEqual(g.next(), {value: undefined, done: true});
18 | assert.equal(x, ':i:0j:0i:1j:1i:2j:2');
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/DefaultArguments.js:
--------------------------------------------------------------------------------
1 | function* f(x = 1) {
2 | yield x;
3 | }
4 |
5 | for (var x of f(42)) {
6 | assert.equal(42, x);
7 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/DoGenerator.js:
--------------------------------------------------------------------------------
1 | function* doGenerator() {
2 | var i = 0;
3 | do {
4 | if (++i % 2 == 0) continue;
5 | yield i;
6 | } while (i < 6);
7 | }
8 |
9 | function accumulate(iterator) {
10 | var result = '';
11 | for (var value of iterator) {
12 | result = result + String(value);
13 | }
14 | return result;
15 | }
16 |
17 | // ----------------------------------------------------------------------------
18 |
19 | assert.equal('135', accumulate(doGenerator()));
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/EmptyGenerator.js:
--------------------------------------------------------------------------------
1 | function* f() {
2 | }
3 |
4 | var g = f();
5 | assert.deepEqual(g.next(), {done: true, value: undefined});
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Error_Disabled.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --generators=false
3 |
4 | function* range(start, end) {
5 | for (var i = start; i < end; i++) {
6 | yield i;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Error_Disabled2.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 | // Options: --forOf=false
3 |
4 | var s = [];
5 | for (var i of yieldFor()) {
6 | s.push(i);
7 | }
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Error_MissingStar.js:
--------------------------------------------------------------------------------
1 | // Should not compile.
2 |
3 | function simpleGenerator() {
4 | yield 1;
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/Finally.js:
--------------------------------------------------------------------------------
1 | var finallyVisited = false;
2 |
3 | function* test() {
4 | try {
5 | yield 42;
6 | } finally {
7 | finallyVisited = true;
8 | }
9 | }
10 |
11 | var it = test();
12 | assert.deepEqual({value: 42, done: false}, it.next());
13 | assert.isFalse(finallyVisited);
14 |
15 | assert.deepEqual({value: undefined, done: true}, it.next());
16 | assert.isTrue(finallyVisited);
17 |
18 | finallyVisited = false;
19 | for (var i of test()) {
20 | assert.equal(42, i);
21 | }
22 | assert.isTrue(finallyVisited);
23 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForEmptyGenerator.js:
--------------------------------------------------------------------------------
1 | function* forEmptyGenerator() {
2 | yield* [];
3 | }
4 |
5 | function accumulate(iterator) {
6 | var result = '';
7 | for (var value of iterator) {
8 | result = result + String(value);
9 | }
10 | return result;
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
15 | assert.equal('', accumulate(forEmptyGenerator()));
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForGenerator.js:
--------------------------------------------------------------------------------
1 | function* forGenerator() {
2 | var a = 1, b = 1;
3 | for (var i = 0; i < 4; i++) {
4 | // TODO(jmesserly): this was changed until we get destructing
5 | //[a, b] = [b, a + b];
6 | var t0 = b;
7 | var t1 = a + b;
8 | a = t0;
9 | b = t1;
10 |
11 | yield a;
12 | }
13 | }
14 |
15 | function accumulate(iterator) {
16 | var result = '';
17 | for (var value of iterator) {
18 | result = result + String(value);
19 | }
20 | return result;
21 | }
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | assert.equal('1235', accumulate(forGenerator()));
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForInGenerator.js:
--------------------------------------------------------------------------------
1 | function* forInGenerator() {
2 | var object = {
3 | a: 0,
4 | b: 1,
5 | c: 2
6 | };
7 | for (var key in object) {
8 | if (key == 'a') {
9 | delete object.b;
10 | object.d = 3;
11 | }
12 | yield key;
13 | yield object[key];
14 | }
15 | }
16 |
17 | function accumulate(iterator) {
18 | var result = '';
19 | for (var value of iterator) {
20 | result = result + String(value);
21 | }
22 | return result;
23 | }
24 |
25 | // ----------------------------------------------------------------------------
26 |
27 | assert.equal('a0c2',accumulate(forInGenerator()));
28 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForInGenerator2.js:
--------------------------------------------------------------------------------
1 | function* forInGenerator2() {
2 | var object = {
3 | a: 0,
4 | b: 1,
5 | c: 2
6 | };
7 | var key;
8 | for (key in object) {
9 | if (key == 'a') {
10 | delete object.b;
11 | object.d = 3;
12 | }
13 | yield key;
14 | yield object[key];
15 | }
16 | }
17 |
18 | function accumulate(iterator) {
19 | var result = '';
20 | for (var value of iterator) {
21 | result = result + String(value);
22 | }
23 | return result;
24 | }
25 |
26 | // ----------------------------------------------------------------------------
27 |
28 | assert.equal('a0c2',accumulate(forInGenerator2()));
29 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForInGenerator3.js:
--------------------------------------------------------------------------------
1 | function* forInGenerator3() {
2 | var object = {
3 | a: 0,
4 | b: {
5 | c: 1,
6 | },
7 | d: 2
8 | };
9 | for (var key in object) {
10 | yield key;
11 | for (var key2 in object[key]) {
12 | yield key2;
13 | }
14 | }
15 | }
16 |
17 | function accumulate(iterator) {
18 | var result = '';
19 | for (var value of iterator) {
20 | result = result + String(value);
21 | }
22 | return result;
23 | }
24 |
25 | // ----------------------------------------------------------------------------
26 |
27 | assert.equal('abcd',accumulate(forInGenerator3()));
28 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ForLexicallyNestedGenerator.js:
--------------------------------------------------------------------------------
1 | function* forLexicallyNestedGenerator() {
2 | yield* (function*() { yield [1,2,3]; yield* [4,5,6]; })();
3 | }
4 |
5 | function accumulate(iterator) {
6 | var result = '';
7 | for (var value of iterator) {
8 | result = result + String(value);
9 | }
10 | return result;
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
15 | assert.equal('1,2,3456', accumulate(forLexicallyNestedGenerator()));
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/GeneratorWithoutYieldOrReturn.js:
--------------------------------------------------------------------------------
1 | var x = 0;
2 |
3 | function* f() {
4 | x++;
5 | }
6 |
7 | var g = f();
8 | assert.equal(x, 0);
9 | assert.deepEqual(g.next(), {done: true, value: undefined});
10 | assert.equal(x, 1);
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/IfGenerator.js:
--------------------------------------------------------------------------------
1 | function* ifGenerator(condition) {
2 | if (condition) {
3 | yield 1;
4 | }
5 | if (!condition) {
6 | yield 2;
7 | }
8 | if (condition) {
9 | yield 3;
10 | } else {
11 | yield 4;
12 | }
13 | }
14 |
15 | function accumulate(iterator) {
16 | var result = '';
17 | for (var value of iterator) {
18 | result = result + String(value);
19 | }
20 | return result;
21 | }
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | assert.equal('13', accumulate(ifGenerator(true)));
26 | assert.equal('24', accumulate(ifGenerator(false)));
27 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/IfStatementWithYield.js:
--------------------------------------------------------------------------------
1 | function* f(x) {
2 | if (yield x) {
3 | return 2;
4 | }
5 | return 3;
6 | }
7 |
8 | var g = f(1);
9 | assert.deepEqual(g.next(), {value: 1, done: false});
10 | assert.deepEqual(g.next(true), {value: 2, done: true});
11 |
12 | g = f(4);
13 | assert.deepEqual(g.next(), {value: 4, done: false});
14 | assert.deepEqual(g.next(false), {value: 3, done: true});
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/LabelledBlockGenerator.js:
--------------------------------------------------------------------------------
1 | var i = 0;
2 | var s = '';
3 |
4 | function* f() {
5 | s += 'a';
6 | while(i++ < 3) {
7 | s += 'b';
8 | label1: {
9 | s += 'c';
10 | break label1;
11 | s += 'd';
12 | }
13 | s += 'e';
14 | }
15 | s += 'f';
16 | }
17 |
18 | var g = f();
19 | g.next();
20 | assert.equal(s, 'abcebcebcef');
21 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/ReturnYieldFor.js:
--------------------------------------------------------------------------------
1 | function* f() {
2 | return yield* h();
3 | }
4 |
5 | function* h() {
6 | yield 111;
7 | yield 222;
8 | return 333;
9 | }
10 |
11 | var g = f();
12 |
13 | assert.deepEqual({value: 111, done: false}, g.next());
14 | assert.deepEqual({value: 222, done: false}, g.next());
15 | assert.deepEqual({value: 333, done: true}, g.next());
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/SequenceGenerator.js:
--------------------------------------------------------------------------------
1 | function* sequenceGenerator() {
2 | var i = 1;
3 | yield i;
4 | i = 3;
5 | yield i + 1;
6 | {
7 | var x = 3;
8 | yield i + x;
9 | yield x;
10 | }
11 | }
12 |
13 | function accumulate(iterator) {
14 | var result = '';
15 | for (var value of iterator) {
16 | result = result + String(value);
17 | }
18 | return result;
19 | }
20 |
21 | // ----------------------------------------------------------------------------
22 |
23 | assert.equal('1463', accumulate(sequenceGenerator()));
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/SimpleGenerator.js:
--------------------------------------------------------------------------------
1 | function* simpleGenerator() {
2 | yield 1;
3 | }
4 |
5 | function accumulate(iterator) {
6 | var result = '';
7 | for (var value of iterator) {
8 | result = result + String(value);
9 | }
10 | return result;
11 | }
12 |
13 | // ----------------------------------------------------------------------------
14 |
15 | assert.equal('1', accumulate(simpleGenerator()));
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/SwitchStatementWithYield.js:
--------------------------------------------------------------------------------
1 | function* f(x) {
2 | switch (yield x) {
3 | case 1:
4 | return 1;
5 | case 2:
6 | return 2;
7 | default:
8 | return 3;
9 | }
10 | throw new Error('Unreachable');
11 | }
12 |
13 | var g = f(1);
14 | assert.deepEqual(g.next(), {value: 1, done: false});
15 | assert.deepEqual(g.next(2), {value: 2, done: true});
16 |
17 | g = f(3);
18 | assert.deepEqual(g.next(), {value: 3, done: false});
19 | assert.deepEqual(g.next(1), {value: 1, done: true});
20 |
21 | var g = f(4);
22 | assert.deepEqual(g.next(), {value: 4, done: false});
23 | assert.deepEqual(g.next(55), {value: 3, done: true});
24 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/This.js:
--------------------------------------------------------------------------------
1 | function* f() {
2 | yield this;
3 | }
4 |
5 | var o = {};
6 | for (var x of f.call(o)) {
7 | assert.equal(o, x);
8 | }
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/TryCatchYieldGenerator.js:
--------------------------------------------------------------------------------
1 | // yield form within a catch block
2 | function* tryCatchYieldGenerator() {
3 | var x = 3;
4 | try {
5 | throw 5;
6 | } catch (e) {
7 | yield e * x;
8 | }
9 | }
10 |
11 | function accumulate(iterator) {
12 | var result = '';
13 | for (var value of iterator) {
14 | result = result + String(value);
15 | }
16 | return result;
17 | }
18 |
19 | // ----------------------------------------------------------------------------
20 |
21 | assert.equal('15', accumulate(tryCatchYieldGenerator()));
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/WhileGenerator.js:
--------------------------------------------------------------------------------
1 | function* whileGenerator(max, continueValue, breakValue) {
2 | var i = 0;
3 | while (i < max) {
4 | i++;
5 | if (i == continueValue) {
6 | continue;
7 | }
8 | if (i == breakValue) {
9 | break;
10 | }
11 | yield i;
12 | }
13 | }
14 |
15 | function accumulate(iterator) {
16 | var result = '';
17 | for (var value of iterator) {
18 | result = result + String(value);
19 | }
20 | return result;
21 | }
22 |
23 | // ----------------------------------------------------------------------------
24 |
25 | assert.equal('13', accumulate(whileGenerator(10, 2, 4)));
26 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/YieldAssignThrow.js:
--------------------------------------------------------------------------------
1 | function* f() {
2 | var x;
3 | try {
4 | x = yield 1;
5 | } catch (ex) {
6 | yield ex;
7 | }
8 | return 2;
9 | }
10 |
11 | var g = f();
12 | assert.deepEqual(g.next(), {value: 1, done: false});
13 | assert.deepEqual(g.next(), {value: 2, done: true});
14 |
15 | g = f();
16 | assert.deepEqual(g.next(), {value: 1, done: false});
17 | assert.deepEqual(g.throw(3), {value: 3, done: false});
18 | assert.deepEqual(g.next(), {value: 2, done: true});
19 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/YieldIdentifier.js:
--------------------------------------------------------------------------------
1 | (function() {
2 |
3 | // ensure non strict mode.
4 | function f() { return this; }
5 | assert(f.call(undefined) !== undefined);
6 |
7 | var yield = 1;
8 | assert.equal(yield, 1);
9 |
10 | function g(yield) {
11 | return yield;
12 | }
13 | assert.equal(g(2), 2);
14 |
15 | var o = {
16 | yield: yield
17 | };
18 | assert.equal(o.yield, 1);
19 |
20 | var o2 = {
21 | yield
22 | };
23 | assert.equal(o.yield, 1);
24 |
25 | function h(yield) {
26 | return yield * yield;
27 | }
28 | assert.equal(h(3), 9);
29 | })();
30 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/YieldUndefinedGenerator.js:
--------------------------------------------------------------------------------
1 | function* yieldUndefinedGenerator1() {
2 | yield 1;
3 | yield;
4 | yield 2;
5 | }
6 |
7 | function* yieldUndefinedGenerator2() {
8 | yield 1;
9 | yield undefined;
10 | yield 2;
11 | }
12 |
13 | function accumulate(iterator) {
14 | var result = '';
15 | for (var value of iterator) {
16 | result = result + String(value);
17 | }
18 | return result;
19 | }
20 |
21 | // ----------------------------------------------------------------------------
22 |
23 | assert.equal('1undefined2', accumulate(yieldUndefinedGenerator1()));
24 | assert.equal('1undefined2', accumulate(yieldUndefinedGenerator2()));
25 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/YieldYield.js:
--------------------------------------------------------------------------------
1 | function* f(x) {
2 | yield (yield x);
3 | }
4 |
5 | var g = f(1);
6 | assert.deepEqual(g.next(), {value: 1, done: false});
7 | assert.deepEqual(g.next(2), {value: 2, done: false});
8 | assert.deepEqual(g.next(3), {value: undefined, done: true});
9 |
10 | function* f2(x) {
11 | yield* (yield x);
12 | }
13 |
14 | g = f(1);
15 | var g2 = f2(1);
16 | assert.deepEqual(g2.next(), {value: 1, done: false});
17 | assert.deepEqual(g2.next(g), {value: 1, done: false});
18 | assert.deepEqual(g2.next(2), {value: 2, done: false});
19 | assert.deepEqual(g2.next(3), {value: undefined, done: true});
20 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/feature/Yield/tryFinallyFinallyGenerator.js:
--------------------------------------------------------------------------------
1 | // finally inside a try finally
2 | function* tryFinallyFinallyGenerator() {
3 | var y;
4 |
5 | try {
6 | y = 13;
7 | try {
8 | yield y;
9 | } finally {
10 | y = 17;
11 | }
12 | yield y;
13 | } finally {
14 | y = 23;
15 | }
16 | yield y;
17 | }
18 |
19 | function accumulate(iterator) {
20 | var result = '';
21 | for (var value of iterator) {
22 | result = result + String(value);
23 | }
24 | return result;
25 | }
26 |
27 | // ----------------------------------------------------------------------------
28 |
29 | assert.equal('131723', accumulate(tryFinallyFinallyGenerator()));
30 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/node-commonjs-test.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 |
3 | var COMPILED_DIR = __dirname + '/commonjs-compiled';
4 |
5 | function onlyJsFiles(path) {
6 | return /\.js$/.test(path);
7 | }
8 |
9 | var testFiles = fs.readdirSync(COMPILED_DIR).filter(onlyJsFiles);
10 |
11 | suite('commonjs', function() {
12 | testFiles.forEach(function(testFile) {
13 | test(testFile, function() {
14 | require('./commonjs-compiled/' + testFile.replace(/\.js$/, ''));
15 | });
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/class.js:
--------------------------------------------------------------------------------
1 | class B {
2 | constructor(x) {
3 | this.x = x;
4 | }
5 | method() {
6 | return 1;
7 | }
8 | }
9 |
10 | class C extends B {
11 | method() {
12 | return super() + this.x;
13 | }
14 | }
15 |
16 | var result = new C(1).method();
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/compile-dir/dep.js:
--------------------------------------------------------------------------------
1 | export var q = 'q';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/compile-dir/file.js:
--------------------------------------------------------------------------------
1 | import {q} from './dep';
2 | export var p = 'module';
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/export-default-class.js:
--------------------------------------------------------------------------------
1 | export default class Q {
2 | foo() {
3 | console.log('class method');
4 | }
5 | get name() {
6 | return 'Q';
7 | }
8 | };
9 | var p = 5;
10 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/export-default.js:
--------------------------------------------------------------------------------
1 | export class q {
2 | foo() {
3 | console.log('class method');
4 | }
5 | }
6 | export default q;
7 | var p = 5;
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/generator.js:
--------------------------------------------------------------------------------
1 | function* f(x, y) {
2 | yield x;
3 | yield y;
4 | }
5 |
6 | var result = [];
7 |
8 | for (var value of f(1, 2)) {
9 | result.push(value);
10 | }
11 |
12 | for (var value of (for (x of f(3, 4)) x * x)) {
13 | result.push(value);
14 | }
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/iAmScript.js:
--------------------------------------------------------------------------------
1 | iAmScript = true; // The last statement becomes the value of the Script.
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/iAmScriptAlso.es:
--------------------------------------------------------------------------------
1 | iAmScript = true; // The last statement becomes the value of the Script.
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/import-another-x.js:
--------------------------------------------------------------------------------
1 | export var iAmNotScript = true;
2 | this.result = 17; // To verify execution, test this global value.
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/import-export.js:
--------------------------------------------------------------------------------
1 | import Q from './export-default-class';
2 | export {Q};
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/import-x.js:
--------------------------------------------------------------------------------
1 | import {x} from './reexport-x';
2 | this.result = x; // To verify execution, test this global value.
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/only-export.js:
--------------------------------------------------------------------------------
1 | export var x = 6;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/reexport-x.js:
--------------------------------------------------------------------------------
1 | export {x} from "./x";
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/node/resources/x.js:
--------------------------------------------------------------------------------
1 | export var x = 'x';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/side-effect.js:
--------------------------------------------------------------------------------
1 | this.sideEffect = 6;
2 | export var currentSideEffect = () => this.sideEffect;
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/subdir/test_d.js:
--------------------------------------------------------------------------------
1 | module e from './test_e';
2 | export {e};
3 | export var name = 'D';
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/subdir/test_e.js:
--------------------------------------------------------------------------------
1 | export var name = 'E';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_a.js:
--------------------------------------------------------------------------------
1 | export var name = 'A';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_b.js:
--------------------------------------------------------------------------------
1 | module c from './test_c';
2 |
3 | export var name = 'B';
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_c.js:
--------------------------------------------------------------------------------
1 | export var name = 'C';
2 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_module.js:
--------------------------------------------------------------------------------
1 | export {name as a} from './test_a';
2 | export {name as b} from './test_b';
3 | export {name as c} from './test_c';
4 |
5 | export var name = 'test';
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_script.js:
--------------------------------------------------------------------------------
1 | import {name as a} from './test_a';
2 | import {name as b} from './test_b';
3 | import {name as c} from './test_c';
4 |
5 | [a, b, c];
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/test_source_map_module.js:
--------------------------------------------------------------------------------
1 | export {name as a} from './test_a';
2 | export {name as b} from './test_b';
3 | export {name as c} from './test_c';
4 |
5 | export var name = 'test';
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/throwsError.js:
--------------------------------------------------------------------------------
1 | throw new Error('test-intepreter');
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/unit/runtime/throwsError.output:
--------------------------------------------------------------------------------
1 | ./traceur test/unit/runtime/throwsError.js 2>&1 | wc -l
2 | 11
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/wiki/.gitignore:
--------------------------------------------------------------------------------
1 | !out
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/wiki/CompilingOffline/UsingCompiledFiles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | You should see "Hi!" in your console.
7 |
8 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/test/wiki/CompilingOffline/greeter.js:
--------------------------------------------------------------------------------
1 | // greeter.js
2 | class Greeter {
3 | sayHi() { console.log('Hi!'); }
4 | }
5 |
6 | var greeter = new Greeter();
7 | greeter.sayHi();
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/README:
--------------------------------------------------------------------------------
1 | http://closure-library.googlecode.com/svn/trunk/ closure-library
2 | https://github.com/johnjbarton/source-map source-map fork from https://github.com/mozilla/source-map BSD
3 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/.gitattributes:
--------------------------------------------------------------------------------
1 | *.txt text
2 | *.js text
3 | *.html text
4 | *.md text
5 | *.json text
6 | *.yml text
7 | *.css text
8 | *.svg text
9 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /npm-debug.log
3 | test.html
4 | .tern-*
5 | *~
6 | *.swp
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.8
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/README.md:
--------------------------------------------------------------------------------
1 | # CodeMirror
2 | [](http://travis-ci.org/marijnh/CodeMirror)
3 | [](http://badge.fury.io/js/codemirror)
4 |
5 | CodeMirror is a JavaScript component that provides a code editor in
6 | the browser. When a mode is available for the language you are coding
7 | in, it will color your code, and optionally help with indentation.
8 |
9 | The project page is http://codemirror.net
10 | The manual is at http://codemirror.net/doc/manual.html
11 | The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md)
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/dialog/dialog.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-dialog {
2 | position: absolute;
3 | left: 0; right: 0;
4 | background: white;
5 | z-index: 15;
6 | padding: .1em .8em;
7 | overflow: hidden;
8 | color: #333;
9 | }
10 |
11 | .CodeMirror-dialog-top {
12 | border-bottom: 1px solid #eee;
13 | top: 0;
14 | }
15 |
16 | .CodeMirror-dialog-bottom {
17 | border-top: 1px solid #eee;
18 | bottom: 0;
19 | }
20 |
21 | .CodeMirror-dialog input {
22 | border: none;
23 | outline: none;
24 | background: transparent;
25 | width: 20em;
26 | color: inherit;
27 | font-family: monospace;
28 | }
29 |
30 | .CodeMirror-dialog button {
31 | font-size: 70%;
32 | }
33 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/display/fullscreen.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-fullscreen {
2 | position: fixed;
3 | top: 0; left: 0; right: 0; bottom: 0;
4 | height: auto;
5 | z-index: 9;
6 | }
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/edit/trailingspace.js:
--------------------------------------------------------------------------------
1 | CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {
2 | if (prev == CodeMirror.Init) prev = false;
3 | if (prev && !val)
4 | cm.removeOverlay("trailingspace");
5 | else if (!prev && val)
6 | cm.addOverlay({
7 | token: function(stream) {
8 | for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {}
9 | if (i > stream.pos) { stream.pos = i; return null; }
10 | stream.pos = l;
11 | return "trailingspace";
12 | },
13 | name: "trailingspace"
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/fold/foldgutter.css:
--------------------------------------------------------------------------------
1 | .CodeMirror-foldmarker {
2 | color: blue;
3 | text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
4 | font-family: arial;
5 | line-height: .3;
6 | cursor: pointer;
7 | }
8 | .CodeMirror-foldgutter {
9 | width: .7em;
10 | }
11 | .CodeMirror-foldgutter-open,
12 | .CodeMirror-foldgutter-folded {
13 | color: #555;
14 | cursor: pointer;
15 | }
16 | .CodeMirror-foldgutter-open:after {
17 | content: "\25BE";
18 | }
19 | .CodeMirror-foldgutter-folded:after {
20 | content: "\25B8";
21 | }
22 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/lint/json-lint.js:
--------------------------------------------------------------------------------
1 | // Depends on jsonlint.js from https://github.com/zaach/jsonlint
2 |
3 | // declare global: jsonlint
4 |
5 | CodeMirror.registerHelper("lint", "json", function(text) {
6 | var found = [];
7 | jsonlint.parseError = function(str, hash) {
8 | var loc = hash.loc;
9 | found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
10 | to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
11 | message: str});
12 | };
13 | try { jsonlint.parse(text); }
14 | catch(e) {}
15 | return found;
16 | });
17 | CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated
18 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/addon/lint/yaml-lint.js:
--------------------------------------------------------------------------------
1 | // Depends on js-yaml.js from https://github.com/nodeca/js-yaml
2 |
3 | // declare global: jsyaml
4 |
5 | CodeMirror.registerHelper("lint", "yaml", function(text) {
6 | var found = [];
7 | try { jsyaml.load(text); }
8 | catch(e) {
9 | var loc = e.mark;
10 | found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message });
11 | }
12 | return found;
13 | });
14 | CodeMirror.yamlValidator = CodeMirror.lint.yaml; // deprecated
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/bin/authors.sh:
--------------------------------------------------------------------------------
1 | # Combine existing list of authors with everyone known in git, sort, add header.
2 | tail --lines=+3 AUTHORS > AUTHORS.tmp
3 | git log --format='%aN' >> AUTHORS.tmp
4 | echo -e "List of CodeMirror contributors. Updated before every release.\n" > AUTHORS
5 | sort -u AUTHORS.tmp >> AUTHORS
6 | rm -f AUTHORS.tmp
7 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/bin/lint:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | var lint = require("../test/lint/lint"),
4 | path = require("path");
5 |
6 | if (process.argv.length > 2) {
7 | lint.checkDir(process.argv[2]);
8 | } else {
9 | process.chdir(path.resolve(__dirname, ".."));
10 | lint.checkDir("lib");
11 | lint.checkDir("mode");
12 | lint.checkDir("addon");
13 | lint.checkDir("keymap");
14 | }
15 |
16 | process.exit(lint.success() ? 0 : 1);
17 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "CodeMirror",
3 | "main": ["lib/codemirror.js", "lib/codemirror.css"],
4 | "ignore": [
5 | "**/.*",
6 | "node_modules",
7 | "components",
8 | "bin",
9 | "demo",
10 | "doc",
11 | "test",
12 | "index.html",
13 | "package.json"
14 | ]
15 | }
16 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/doc/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/google/FakeMaker/69fcd73622c034ba52ff73a127e2d880f7a43620/extension/third_party/traceur-compiler/third_party/codemirror-3.22/doc/logo.png
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/mode/rpm/spec/spec.css:
--------------------------------------------------------------------------------
1 | .cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;}
2 | .cm-s-default span.cm-macro {color: #b218b2;}
3 | .cm-s-default span.cm-section {color: green; font-weight: bold;}
4 | .cm-s-default span.cm-script {color: red;}
5 | .cm-s-default span.cm-issue {color: yellow;}
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/mode/ruby/test.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var mode = CodeMirror.getMode({indentUnit: 2}, "ruby");
3 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
4 |
5 | MT("divide_equal_operator",
6 | "[variable bar] [operator /=] [variable foo]");
7 |
8 | MT("divide_equal_operator_no_spacing",
9 | "[variable foo][operator /=][number 42]");
10 |
11 | })();
12 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/mode/tiddlywiki/tiddlywiki.css:
--------------------------------------------------------------------------------
1 | span.cm-underlined {
2 | text-decoration: underline;
3 | }
4 | span.cm-strikethrough {
5 | text-decoration: line-through;
6 | }
7 | span.cm-brace {
8 | color: #170;
9 | font-weight: bold;
10 | }
11 | span.cm-table {
12 | color: blue;
13 | font-weight: bold;
14 | }
15 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/mode/tiki/tiki.css:
--------------------------------------------------------------------------------
1 | .cm-tw-syntaxerror {
2 | color: #FFF;
3 | background-color: #900;
4 | }
5 |
6 | .cm-tw-deleted {
7 | text-decoration: line-through;
8 | }
9 |
10 | .cm-tw-header5 {
11 | font-weight: bold;
12 | }
13 | .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/
14 | padding-left: 10px;
15 | }
16 |
17 | .cm-tw-box {
18 | border-top-width: 0px ! important;
19 | border-style: solid;
20 | border-width: 1px;
21 | border-color: inherit;
22 | }
23 |
24 | .cm-tw-underline {
25 | text-decoration: underline;
26 | }
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/test/mode_test.css:
--------------------------------------------------------------------------------
1 | .mt-output .mt-token {
2 | border: 1px solid #ddd;
3 | white-space: pre;
4 | font-family: "Consolas", monospace;
5 | text-align: center;
6 | }
7 |
8 | .mt-output .mt-style {
9 | font-size: x-small;
10 | }
11 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/third_party/codemirror-3.22/theme/ambiance-mobile.css:
--------------------------------------------------------------------------------
1 | .cm-s-ambiance.CodeMirror {
2 | -webkit-box-shadow: none;
3 | -moz-box-shadow: none;
4 | box-shadow: none;
5 | }
6 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/traceur:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | require('./src/node/command.js');
4 |
--------------------------------------------------------------------------------
/extension/third_party/traceur-compiler/traceur-build:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | require('./build/node/command.js');
4 |
--------------------------------------------------------------------------------