Commit graph

545 commits

Author SHA1 Message Date
Cyrus Najmabadi a6348c1e31 Use 'let' in the emitter. 2015-03-13 12:34:12 -07:00
Cyrus Najmabadi 29bfc15d9b use for-of in more places. 2015-03-13 09:41:54 -07:00
Cyrus Najmabadi 4642b869fa Use for-of in emitter.ts 2015-03-13 09:08:27 -07:00
Vladimir Matveev 751b1aee16 disallow recursive references for block-scoped bindings 2015-03-11 16:54:18 -07:00
Vladimir Matveev 76dcfb660b Merge pull request #2291 from Microsoft/letConstInSwitchStatements
introduce CaseBlock as a block-scoped container for switch statements
2015-03-10 18:33:54 -07:00
Vladimir Matveev 59c71acae8 introduce emitCaseBlock function 2015-03-10 18:17:52 -07:00
Vladimir Matveev efcf0e6f57 introduce CaseBlock as a block-scoped container for switch statements 2015-03-10 17:50:54 -07:00
Jason Freeman f389aefc47 Fix call to emitNode after merge with master 2015-03-10 10:41:26 -07:00
Jason Freeman 1349a196a0 Merge branch 'master' of https://github.com/Microsoft/TypeScript into for-ofES5 2015-03-09 19:45:37 -07:00
Jason Freeman b15d8aa2b5 Address PR feedback 2015-03-09 19:45:14 -07:00
Cyrus Najmabadi 31cf443a28 Add specialized codepath for emitting without comments. 2015-03-09 15:47:23 -07:00
Cyrus Najmabadi bfbc18d6d7 rename emitNode to emitNodeWithoutSourceMap 2015-03-09 15:01:02 -07:00
Cyrus Najmabadi 103bb34d7b Merge branch 'master' into indentSimplification
Conflicts:
	src/compiler/emitter.ts
2015-03-09 13:04:24 -07:00
Jason Freeman a27fbff280 Merge branch 'master' of https://github.com/Microsoft/TypeScript into for-ofES5
Conflicts:
	tests/baselines/reference/parserES5ForOfStatement18.js
	tests/baselines/reference/parserES5ForOfStatement21.js
2015-03-09 11:17:31 -07:00
Cyrus Najmabadi 35b56aa69b Further simplification. 2015-03-09 01:07:02 -07:00
Cyrus Najmabadi 6340531a16 Simplify indentation code in the emitter. 2015-03-08 23:07:03 -07:00
Cyrus Najmabadi 29c06f9d6a Move variable closer to where it is used. 2015-03-08 22:35:28 -07:00
Cyrus Najmabadi c371f1e521 Make the preservation of formatting an optional experimental compiler flag. 2015-03-08 19:06:55 -07:00
Cyrus Najmabadi 21627384a8 Merge branch 'master' into propertyAccessEmit 2015-03-07 13:51:10 -08:00
Cyrus Najmabadi 2a990a8685 Preserve newlines for conditional expressions 2015-03-07 13:50:26 -08:00
Cyrus Najmabadi dddc4660a1 Simplify code to emit indent code. 2015-03-07 13:33:02 -08:00
Cyrus Najmabadi 680e48f507 Preserve newlines on either side of a binary expression. 2015-03-07 12:54:12 -08:00
Cyrus Najmabadi bdcdd84dda CR feedback. 2015-03-07 02:08:36 -08:00
Cyrus Najmabadi 0c5654164f Fix up comment. 2015-03-07 01:33:18 -08:00
Cyrus Najmabadi c76f71cfae When emitting an arrow function, parenthesize the body if it could be interpreted as a block instead of an object literal. 2015-03-07 01:30:45 -08:00
Cyrus Najmabadi a76eb69996 Add an 'isVariableLike' helper function. 2015-03-06 18:45:45 -08:00
Jason Freeman fecd20a3db Fix sourcemaps for 'for...of' and no source maps for synthesized nodes 2015-03-05 11:47:40 -08:00
Cyrus Najmabadi 62d304b069 Preserve newlines for property access expressions on multiple lines. 2015-03-05 02:31:55 -08:00
Jason Freeman ed3ab96eed Add tests for destructuring 'for...of' 2015-03-04 19:35:13 -08:00
Jason Freeman 905f35091f Do not create a temp for RHS if it's an identifier 2015-03-04 19:35:10 -08:00
Jason Freeman 4bb0587dd4 Fix createTempVariable to always record the name in the currentScopeNames 2015-03-04 19:35:06 -08:00
Jason Freeman 4d3265088b Revert change to createTempVariable 2015-03-04 19:35:03 -08:00
Jason Freeman a99449a1ef Support destructuring in 'for...of' loops 2015-03-04 19:34:56 -08:00
Jason Freeman a0f108c4fb Emit 'for...of' statements with let/const initializers 2015-03-04 19:34:53 -08:00
Jason Freeman f915efa6d7 Emit for...of when LHS is expression 2015-03-04 19:34:49 -08:00
Jason Freeman 9b76a0298b Remove tempCount 2015-03-04 19:34:46 -08:00
Jason Freeman 76e9b6ab0e Make createTempVariable call into generateUniqueNameForLocation 2015-03-04 19:34:36 -08:00
Jason Freeman e417e1dacc Emit 'for...of' loop when LHS is a var 2015-03-04 19:34:33 -08:00
Anders Hejlsberg a87c45711f Renaming SymbolFlags.Import to SymbolFlags.Alias 2015-03-04 10:26:38 -08:00
Anders Hejlsberg 91e8b821ad Merge branch 'master' into exportDefault
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/contextualTyping.js.map
	tests/baselines/reference/contextualTyping.sourcemap.txt
	tests/baselines/reference/out-flag.js.map
	tests/baselines/reference/properties.js.map
	tests/baselines/reference/recursiveClassReferenceTest.js.map
	tests/baselines/reference/sourceMap-FileWithComments.js.map
	tests/baselines/reference/sourceMap-FileWithComments.sourcemap.txt
	tests/baselines/reference/typeResolution.js.map
2015-03-04 06:39:10 -08:00
Vladimir Matveev 2a6b59a3ba addressed PR feedback 2015-03-03 23:46:51 -08:00
Vladimir Matveev e49d51a088 look through the entire chain of name scopes to ensure that name is unique 2015-03-03 21:34:20 -08:00
Anders Hejlsberg f2be34a302 Support emit of unnamed export default function/class 2015-03-03 15:56:40 -08:00
Anders Hejlsberg 689112fccc Changing emit(...) to emitNode(...) in several places 2015-03-03 15:27:33 -08:00
Anders Hejlsberg 9af8ae4386 Parsing, binding, checking of export default with function/class 2015-03-03 15:09:40 -08:00
Daniel Rosenwasser 7212912307 Merge pull request #2169 from Microsoft/withANameLikeUnicodeYoudThinkThereWouldntBeSoManyWaysToDoIt
Add support for extended Unicode escape sequences in strings and templates
2015-03-03 12:16:42 -08:00
Daniel Rosenwasser 5c5a48911a Words. 2015-03-03 11:56:03 -08:00
Daniel Rosenwasser f9cc01355e Addressed CR feedback, also properly accounted for template literals. 2015-03-02 16:40:00 -08:00
Daniel Rosenwasser 5ec68eb0e4 Harden against trees without parent pointers for emitting literals; fix lookahead in text for numeric literal indicators. 2015-03-02 15:51:23 -08:00
Anders Hejlsberg 234358e6c6 Unifying ES6 and TypeScript external modules
Export assignments are now equivalent to export of member named "default"
Export assignments and exports defaults collected by binder
Export * declarations collected by binder
Simplified logic for marking import symbols as referenced
Removed "location" parameter from resolveEntityName
Improved error position reporting in resolveEntityName
2015-03-02 12:17:05 -08:00