Hello community,
here is the log from the commit of package ghc-language-ecmascript for
openSUSE:Factory checked in at 2017-07-23 12:14:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-language-ecmascript (Old)
and /work/SRC/openSUSE:Factory/.ghc-language-ecmascript.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-language-ecmascript"
Sun Jul 23 12:14:30 2017 rev:3 rq:511914 version:0.17.2.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-language-ecmascript/ghc-language-ecmascript.changes
2017-03-12 20:04:15.943500948 +0100
+++
/work/SRC/openSUSE:Factory/.ghc-language-ecmascript.new/ghc-language-ecmascript.changes
2017-07-23 12:14:30.762788307 +0200
@@ -1,0 +2,5 @@
+Mon Jul 17 03:01:30 UTC 2017 - [email protected]
+
+- Update to version 0.17.2.0.
+
+-------------------------------------------------------------------
Old:
----
language-ecmascript-0.17.1.0.tar.gz
language-ecmascript.cabal
New:
----
language-ecmascript-0.17.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-language-ecmascript.spec ++++++
--- /var/tmp/diff_new_pack.qG2XpG/_old 2017-07-23 12:14:32.062604699 +0200
+++ /var/tmp/diff_new_pack.qG2XpG/_new 2017-07-23 12:14:32.066604134 +0200
@@ -19,17 +19,17 @@
%global pkg_name language-ecmascript
%bcond_with tests
Name: ghc-%{pkg_name}
-Version: 0.17.1.0
+Version: 0.17.2.0
Release: 0
Summary: JavaScript parser and pretty-printer library
License: BSD-3-Clause
Group: Development/Languages/Other
Url: https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-Diff-devel
BuildRequires: ghc-QuickCheck-devel
+BuildRequires: ghc-charset-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-data-default-class-devel
BuildRequires: ghc-mtl-devel
@@ -70,7 +70,6 @@
%prep
%setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
++++++ language-ecmascript-0.17.1.0.tar.gz ->
language-ecmascript-0.17.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/language-ecmascript-0.17.1.0/CHANGELOG
new/language-ecmascript-0.17.2.0/CHANGELOG
--- old/language-ecmascript-0.17.1.0/CHANGELOG 2016-02-28 17:04:38.000000000
+0100
+++ new/language-ecmascript-0.17.2.0/CHANGELOG 2017-07-11 21:47:22.000000000
+0200
@@ -1,4 +1,10 @@
Version change log.
+
+=0.17.2.0=
+Issue #82: Tighter lexing of identifiers using Unicode character classes
(thanks @berdario).
+
+Dependency version bumps.
+
=0.17.1.0=
Improvements to pretty-printing (Github PR #78) + fixed a bug in
quasi-quotation (Github PR #77).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/language-ecmascript-0.17.1.0/language-ecmascript.cabal
new/language-ecmascript-0.17.2.0/language-ecmascript.cabal
--- old/language-ecmascript-0.17.1.0/language-ecmascript.cabal 2016-02-28
20:02:01.000000000 +0100
+++ new/language-ecmascript-0.17.2.0/language-ecmascript.cabal 2017-07-11
21:45:56.000000000 +0200
@@ -1,8 +1,8 @@
Name: language-ecmascript
-Version: 0.17.1.0
+Version: 0.17.2.0
Cabal-Version: >= 1.10
Copyright: (c) 2007-2012 Brown University, (c) 2008-2010 Claudiu Saftoiu,
- (c) 2012-2015 Stevens Institute of Technology, (c) 2016 Andrey
Chudnov, (c) 2016 Eyal Lotem
+ (c) 2012-2015 Stevens Institute of Technology, (c) 2016 Eyal
Lotem, (c) 2016-2017 Andrey Chudnov
License: BSD3
License-file: LICENSE
Author: Andrey Chudnov, Arjun Guha, Spiridon Aristides Eliopoulos,
@@ -11,13 +11,13 @@
Homepage: http://github.com/jswebtools/language-ecmascript
Bug-reports: http://github.com/jswebtools/language-ecmascript/issues
Stability: experimental
-Tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3
+Tested-with: GHC==7.4.2, GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2
Extra-Source-Files: test/parse-pretty/*.js, test/diff/left/*.js,
test/diff/right/*.js, test/diff/expects/*.diff, CHANGELOG
Category: Language
Build-Type: Simple
Synopsis: JavaScript parser and pretty-printer library
Description:
- Tools for working with ECMAScript 3 (popularly known as JavaScript).
+ Tools for working with ECMAScript 3 (popularly known as JavaScript).
Includes a parser, pretty-printer, tools for working with source tree
annotations and an arbitrary instance. See CHANGELOG for a summary of
changes. The package follows the Haskell Package Versioning Policy since
version 0.17.0.1.
@@ -29,7 +29,7 @@
Source-repository this
type: git
location: git://github.com/jswebtools/language-ecmascript.git
- tag: 0.17.1.0
+ tag: 0.17.2.0
Library
Hs-Source-Dirs:
@@ -41,16 +41,17 @@
wl-pprint >= 1.2 && < 2,
containers == 0.*,
uniplate >= 1.6 && <1.7,
- data-default-class >= 0.0.1 && < 0.1,
+ data-default-class >= 0.0.1 && < 0.2,
QuickCheck >= 2.5 && < 3,
template-haskell >= 2.7 && < 3,
Diff == 0.3.*,
- testing-feat >= 0.4.0.2 && < 0.5
+ testing-feat >= 0.4.0.2 && < 0.5,
+ charset >= 0.3
ghc-options:
-fwarn-incomplete-patterns
Exposed-Modules:
- Language.ECMAScript3
- Language.ECMAScript3.Lexer
+ Language.ECMAScript3
+ Language.ECMAScript3.Lexer
Language.ECMAScript3.Parser
Language.ECMAScript3.PrettyPrint
Language.ECMAScript3.Syntax
@@ -83,11 +84,11 @@
parsec >= 3 && < 3.2.0,
wl-pprint >= 1.2 && < 2,
containers == 0.*,
- directory >= 1.2 && < 1.3,
+ directory >= 1.2 && < 1.4,
filepath >= 1.3 && < 1.5,
- HUnit >= 1.2 && < 1.4,
+ HUnit >= 1.2 && < 1.7,
QuickCheck >= 2.5 && < 3,
- data-default-class >= 0.0.1 && < 0.1,
+ data-default-class >= 0.0.1 && < 0.2,
test-framework >= 0.8 && < 0.9,
test-framework-hunit >= 0.3.0 && < 0.4,
test-framework-quickcheck2 >= 0.3.0.1 && < 0.4,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/language-ecmascript-0.17.1.0/src/Language/ECMAScript3/Lexer.hs
new/language-ecmascript-0.17.2.0/src/Language/ECMAScript3/Lexer.hs
--- old/language-ecmascript-0.17.1.0/src/Language/ECMAScript3/Lexer.hs
2015-09-24 01:27:51.000000000 +0200
+++ new/language-ecmascript-0.17.2.0/src/Language/ECMAScript3/Lexer.hs
2017-07-11 21:30:05.000000000 +0200
@@ -13,6 +13,10 @@
,hexIntLit,decIntLit, decDigits,
decDigitsOpt, exponentPart, decLit) where
import Prelude hiding (lex)
+import Data.Char
+import Data.Monoid ((<>), mconcat)
+import qualified Data.CharSet as Set
+import qualified Data.CharSet.Unicode.Category as Set
import Text.Parsec
import qualified Text.Parsec.Token as T
import Language.ECMAScript3.Parser.State
@@ -21,8 +25,33 @@
import Control.Applicative ((<$>), (<*>))
import Data.Maybe (isNothing)
+identifierStartCharSet :: Set.CharSet
+identifierStartCharSet =
+ mconcat
+ [ Set.fromDistinctAscList "$_"
+ , Set.lowercaseLetter
+ , Set.uppercaseLetter
+ , Set.titlecaseLetter
+ , Set.modifierLetter
+ , Set.otherLetter
+ , Set.letterNumber
+ ]
+
+identifierRestCharSet :: Set.CharSet
+identifierRestCharSet =
+ identifierStartCharSet
+ <> mconcat
+ [ Set.nonSpacingMark
+ , Set.spacingCombiningMark
+ , Set.decimalNumber
+ , Set.connectorPunctuation
+ ]
+
identifierStart :: Stream s Identity Char => Parser s Char
-identifierStart = letter <|> oneOf "$_"
+identifierStart = satisfy (flip Set.member identifierStartCharSet) <?>
"letter, '$', '_'"
+
+identifierRest :: Stream s Identity Char => Parser s Char
+identifierRest = satisfy (flip Set.member identifierRestCharSet) <?> "letter,
digits, '$', '_' ..."
javascriptDef :: Stream s Identity Char =>T.GenLanguageDef s ParserState
Identity
javascriptDef =
@@ -31,7 +60,7 @@
"//"
False -- no nested comments
identifierStart
- (alphaNum <|> oneOf "$_") -- identifier rest
+ identifierRest
(oneOf "{}<>()~.,?:|&^=!+-*/%!") -- operator start
(oneOf "=<>|&+") -- operator rest
["break", "case", "catch", "const", "continue", "debugger",