|
1 | 1 | #!/usr/bin/env python |
2 | | -# Copyright (c) 2004-2006 ActiveState Software Inc. |
| 2 | +# ***** BEGIN LICENSE BLOCK ***** |
| 3 | +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
3 | 4 | # |
4 | | -# Contributors: |
| 5 | +# The contents of this file are subject to the Mozilla Public License |
| 6 | +# Version 1.1 (the "License"); you may not use this file except in |
| 7 | +# compliance with the License. You may obtain a copy of the License at |
| 8 | +# http://www.mozilla.org/MPL/ |
| 9 | +# |
| 10 | +# Software distributed under the License is distributed on an "AS IS" |
| 11 | +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
| 12 | +# License for the specific language governing rights and limitations |
| 13 | +# under the License. |
| 14 | +# |
| 15 | +# The Original Code is Komodo code. |
| 16 | +# |
| 17 | +# The Initial Developer of the Original Code is ActiveState Software Inc. |
| 18 | +# Portions created by ActiveState Software Inc are Copyright (C) 2004-2006 |
| 19 | +# ActiveState Software Inc. All Rights Reserved. |
| 20 | +# |
| 21 | +# Portions created by German Mendez Bravo (Kronuz) are Copyright (C) 2017 |
| 22 | +# German Mendez Bravo (Kronuz). All Rights Reserved. |
| 23 | +# |
| 24 | +# Contributor(s): |
5 | 25 | |
6 | 26 | # German Mendez Bravo (Kronuz) ([email protected]) |
7 | | - |
| 27 | +# |
| 28 | +# Alternatively, the contents of this file may be used under the terms of |
| 29 | +# either the GNU General Public License Version 2 or later (the "GPL"), or |
| 30 | +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
| 31 | +# in which case the provisions of the GPL or the LGPL are applicable instead |
| 32 | +# of those above. If you wish to allow use of your version of this file only |
| 33 | +# under the terms of either the GPL or the LGPL, and not to allow others to |
| 34 | +# use your version of this file under the terms of the MPL, indicate your |
| 35 | +# decision by deleting the provisions above and replace them with the notice |
| 36 | +# and other provisions required by the GPL or the LGPL. If you do not delete |
| 37 | +# the provisions above, a recipient may use your version of this file under |
| 38 | +# the terms of any one of the MPL, the GPL or the LGPL. |
| 39 | +# |
| 40 | +# ***** END LICENSE BLOCK ***** |
8 | 41 | """ |
9 | 42 | ecmacile - a Code Intelligence Language Engine for the ECMAScript language |
10 | 43 |
|
@@ -915,7 +948,13 @@ def visit_ExportDefaultDeclaration(self, node): |
915 | 948 | line = node.loc.start.line |
916 | 949 | start = node.range[0] |
917 | 950 | end = node.range[1] |
918 | | - self._visitSimpleAssign(default, declaration, line, start, end) |
| 951 | + |
| 952 | + if typ in (esprima.Syntax.Identifier, esprima.JSXSyntax.JSXIdentifier, esprima.Syntax.MemberExpression): |
| 953 | + extra_attributes = ["__no_defn__"] |
| 954 | + else: |
| 955 | + extra_attributes = [] |
| 956 | + |
| 957 | + self._visitSimpleAssign(default, declaration, line, start, end, extra_attributes=extra_attributes) |
919 | 958 |
|
920 | 959 | self.nsstack.pop() |
921 | 960 |
|
|
0 commit comments