Add support for transpiling ES6 Unicode regular expressions

**Do not merge this yet!**

@arv This is an initial draft of how I think this could work. The build fails for obvious reasons (see below) but do you have any feedback on the general implementation for now?

How do you want to pull in the regexpu dependency? I’m using `require()` as an example in this patch. Let me know if you want me to make any changes to regexpu’s export logic.
Or the commonjs version.


On Wed, Aug 27, 2014 at 8:56 AM, Domenic Denicola <notifications@github.com>
wrote:

> In src/codegeneration/RegularExpressionTransformer.js:
>
> > +// you may not use this file except in compliance with the License.
> > +// You may obtain a copy of the License at
> > +//
> > +//      http://www.apache.org/licenses/LICENSE-2.0
> > +//
> > +// Unless required by applicable law or agreed to in writing, software
> > +// distributed under the License is distributed on an 'AS IS' BASIS,
> > +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +// See the License for the specific language governing permissions and
> > +// limitations under the License.
> > +
> > +import {ParseTreeTransformer} from './ParseTreeTransformer';
> > +import {LiteralExpression} from '../syntax/trees/ParseTrees';
> > +import {LiteralToken} from '../syntax/LiteralToken';
> > +import {REGULAR_EXPRESSION} from '../syntax/TokenType';
> > +var rewritePattern = require('regexpu').rewritePattern;
>
> You could author in ES6 and then include the AMD version (generated via
> Traceur or es6-module-transpiler) in the published package.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/traceur-compiler/pull/1294/files#r16784713>.
>