Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
26e4672b
Commit
26e4672b
authored
Mar 03, 2010
by
Roberto Raggi
Browse files
Updated the QML/JS front-end.
parent
08b9323f
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/parser/cmd.sed
0 → 100644
View file @
26e4672b
s
/
qdeclarativejs
/
qmljs
/
g
s
/
QDECLARATIVEJS
/
QMLJS
/
g
s
/
QDeclarativeJS
/
QmlJS
/
g
s
/
QDeclarativeParser
/
QmlParser
/
g
src/libs/qmljs/parser/gen-parser.sh
0 → 100644
View file @
26e4672b
#!/bin/sh
me
=
$(
dirname
$0
)
for
i
in
$QTDIR
/src/declarative/qml/parser/
*
.
{
h,cpp,pri
}
;
do
sed
-f
$me
/cmd.sed
$i
>
$me
/
$(
echo
$(
basename
$i
)
|
sed
s/qdeclarativejs/qmljs/
)
done
src/libs/qmljs/parser/qmljsast.cpp
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsast_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
@@ -2599,11 +2599,17 @@ public:
UiObjectInitializer
*
initializer
)
:
qualifiedId
(
qualifiedId
),
qualifiedTypeNameId
(
qualifiedTypeNameId
),
initializer
(
initializer
)
initializer
(
initializer
),
hasOnToken
(
false
)
{
kind
=
K
;
}
virtual
SourceLocation
firstSourceLocation
()
const
{
return
qualifiedId
->
identifierToken
;
}
{
if
(
hasOnToken
&&
qualifiedTypeNameId
)
return
qualifiedTypeNameId
->
identifierToken
;
return
qualifiedId
->
identifierToken
;
}
virtual
SourceLocation
lastSourceLocation
()
const
{
return
initializer
->
rbraceToken
;
}
...
...
@@ -2615,6 +2621,7 @@ public:
UiQualifiedId
*
qualifiedTypeNameId
;
UiObjectInitializer
*
initializer
;
SourceLocation
colonToken
;
bool
hasOnToken
;
};
class
QML_PARSER_EXPORT
UiScriptBinding
:
public
UiObjectMember
...
...
src/libs/qmljs/parser/qmljsastfwd_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsastvisitor.cpp
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsastvisitor_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsengine_p.cpp
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsengine_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsglobal_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsgrammar.cpp
View file @
26e4672b
This diff is collapsed.
Click to expand it.
src/libs/qmljs/parser/qmljsgrammar_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
@@ -61,10 +61,10 @@ QT_BEGIN_NAMESPACE
class
QmlJSGrammar
{
public:
enum
VariousConstants
{
enum
{
EOF_SYMBOL
=
0
,
REDUCE_HERE
=
99
,
SHIFT_THERE
=
9
8
,
REDUCE_HERE
=
100
,
SHIFT_THERE
=
9
9
,
T_AND
=
1
,
T_AND_AND
=
2
,
T_AND_EQ
=
3
,
...
...
@@ -90,12 +90,12 @@ public:
T_EQ_EQ
=
18
,
T_EQ_EQ_EQ
=
19
,
T_FALSE
=
83
,
T_FEED_JS_EXPRESSION
=
9
5
,
T_FEED_JS_PROGRAM
=
9
7
,
T_FEED_JS_SOURCE_ELEMENT
=
9
6
,
T_FEED_JS_STATEMENT
=
9
4
,
T_FEED_UI_OBJECT_MEMBER
=
9
3
,
T_FEED_UI_PROGRAM
=
9
2
,
T_FEED_JS_EXPRESSION
=
9
6
,
T_FEED_JS_PROGRAM
=
9
8
,
T_FEED_JS_SOURCE_ELEMENT
=
9
7
,
T_FEED_JS_STATEMENT
=
9
5
,
T_FEED_UI_OBJECT_MEMBER
=
9
4
,
T_FEED_UI_PROGRAM
=
9
3
,
T_FINALLY
=
20
,
T_FOR
=
21
,
T_FUNCTION
=
22
,
...
...
@@ -127,6 +127,7 @@ public:
T_NOT_EQ_EQ
=
46
,
T_NULL
=
81
,
T_NUMERIC_LITERAL
=
47
,
T_ON
=
92
,
T_OR
=
48
,
T_OR_EQ
=
49
,
T_OR_OR
=
50
,
...
...
@@ -163,15 +164,15 @@ public:
T_XOR
=
79
,
T_XOR_EQ
=
80
,
ACCEPT_STATE
=
63
5
,
RULE_COUNT
=
34
3
,
STATE_COUNT
=
6
36
,
TERMINAL_COUNT
=
10
0
,
ACCEPT_STATE
=
63
9
,
RULE_COUNT
=
34
5
,
STATE_COUNT
=
6
40
,
TERMINAL_COUNT
=
10
1
,
NON_TERMINAL_COUNT
=
106
,
GOTO_INDEX_OFFSET
=
6
36
,
GOTO_INFO_OFFSET
=
2
520
,
GOTO_CHECK_OFFSET
=
2
520
GOTO_INDEX_OFFSET
=
6
40
,
GOTO_INFO_OFFSET
=
2
699
,
GOTO_CHECK_OFFSET
=
2
699
};
static
const
char
*
const
spell
[];
...
...
src/libs/qmljs/parser/qmljslexer.cpp
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
@@ -56,12 +56,10 @@
#include
<stdio.h>
#include
<string.h>
QT_BEGIN_NAMESPACE
extern
double
qstrtod
(
const
char
*
s00
,
char
const
**
se
,
bool
*
ok
);
QT_END_NAMESPACE
QT_QML_BEGIN_NAMESPACE
extern
double
qstrtod
(
const
char
*
s00
,
char
const
**
se
,
bool
*
ok
);
#define shiftWindowsLineBreak() \
do { \
if (((current == '\r') && (next1 == '\n')) \
...
...
@@ -168,6 +166,8 @@ int Lexer::findReservedWord(const QChar *c, int size) const
return
QmlJSGrammar
::
T_IN
;
else
if
(
c
[
0
]
==
QLatin1Char
(
'a'
)
&&
c
[
1
]
==
QLatin1Char
(
's'
))
return
QmlJSGrammar
::
T_AS
;
else
if
(
c
[
0
]
==
QLatin1Char
(
'o'
)
&&
c
[
1
]
==
QLatin1Char
(
'n'
))
return
QmlJSGrammar
::
T_ON
;
}
break
;
case
3
:
{
...
...
src/libs/qmljs/parser/qmljslexer_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsmemorypool_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsnodepool_p.h
View file @
26e4672b
/****************************************************************************
**
** Copyright (C) 200
9
Nokia Corporation and/or its subsidiary(-ies).
** Copyright (C) 20
1
0 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
...
...
src/libs/qmljs/parser/qmljsparser.cpp
View file @
26e4672b
This diff is collapsed.
Click to expand it.
src/libs/qmljs/parser/qmljsparser_p.h
View file @
26e4672b
...
...
@@ -235,9 +235,9 @@ protected:
#define J_SCRIPT_REGEXPLITERAL_RULE1 7
4
#define J_SCRIPT_REGEXPLITERAL_RULE1 7
6
#define J_SCRIPT_REGEXPLITERAL_RULE2 7
5
#define J_SCRIPT_REGEXPLITERAL_RULE2 7
7
QT_QML_END_NAMESPACE
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment