Skip to content

Commit

Permalink
Fix for Pascal, TCL and Fortran lexers
Browse files Browse the repository at this point in the history
  • Loading branch information
mezomish committed Mar 24, 2011
1 parent 7d0c4b8 commit 1f30102
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 137 deletions.
9 changes: 5 additions & 4 deletions cmake/SomeLexers.cmake
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
# find TCL lexer
find_path ( QSCI_TCL_LEXER qscilexertcl.h ${LIBQSCINTILLA2_INCLUDE_DIR} )

find_path ( QSCI_TCL_LEXER qscilexertcl.h ${QSCINTILLA_INCLUDE_DIR} )
if ( QSCI_TCL_LEXER )
ADD_DEFINITIONS (
-DJUFF_TCL_LEXER
)
endif ( QSCI_TCL_LEXER )

# find Pascal lexer
find_path ( QSCI_PASCAL_LEXER qscilexerpascal.h ${LIBQSCINTILLA2_INCLUDE_DIR} )
find_path ( QSCI_PASCAL_LEXER qscilexerpascal.h ${QSCINTILLA_INCLUDE_DIR} )
if ( QSCI_PASCAL_LEXER )
ADD_DEFINITIONS (
-DJUFF_PASCAL_LEXER
)
endif ( QSCI_PASCAL_LEXER )

# find Fortran lexer
find_path ( QSCI_FORTRAN_LEXER qscilexerfortran.h ${LIBQSCINTILLA2_INCLUDE_DIR} )
find_path ( QSCI_FORTRAN_LEXER qscilexerfortran.h ${QSCINTILLA_INCLUDE_DIR} )
if ( QSCI_FORTRAN_LEXER )
ADD_DEFINITIONS (
-DJUFF_FORTRAN_LEXER
)
endif ( QSCI_FORTRAN_LEXER )

# find CSS3Property
find_path ( QSCI_CSS_LEXER qscilexercss.h ${LIBQSCINTILLA2_INCLUDE_DIR} )
find_path ( QSCI_CSS_LEXER qscilexercss.h ${QSCINTILLA_INCLUDE_DIR} )
if ( QSCI_CSS_LEXER )
EXECUTE_PROCESS (
COMMAND grep CSS3Property ${QSCI_CSS_LEXER}/qscilexercss.h
Expand Down
7 changes: 7 additions & 0 deletions pack.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if "%1" == "" GOTO No_Version
echo Copying program binaries...
copy "build\juffed.exe" "%1"
copy "build\libjuff.dll" "%1"
copy "build\libjuffed-engine-*.dll" "%1"

REM localizations, apis, hlschemes
echo.
Expand All @@ -29,6 +30,12 @@ if "%1" == "" GOTO No_Version
copy "apis\*.api" "%1\apis"
copy "hlschemes\*.xml" "%1\hlschemes"

REM plugins
echo.
echo ----------------------------------
echo Copying Plugins...
copy "build\plugins\*.dll" "%1\plugins\"

REM Misc files
echo.
echo ----------------------------------
Expand Down
123 changes: 0 additions & 123 deletions src/app/qsci/settings/FileTypeSettings.cpp

This file was deleted.

31 changes: 21 additions & 10 deletions src/lib/FileTypeSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


QStringList FileTypeSettings::getTypeList() {
return Settings::instance()->value("filetypes", "types").toStringList();
if ( Settings::instance()->valueExists("filetypes", "types") )
return Settings::instance()->value("filetypes", "types").toStringList();
else
return QStringList();
}

QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
Expand Down Expand Up @@ -59,6 +62,9 @@ QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
else if ( type == "Diff") {
list << "*.diff" << "*.patch";
}
else if ( type == "Fortran") {
list << "*.f" << "*.f77" << "*.f90";
}
else if ( type == "Haskell") {
list << "*.hs" << "*.lhs";
}
Expand Down Expand Up @@ -95,6 +101,9 @@ QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
else if ( type == "NXC") {
list << "*.nxc";
}
else if ( type == "Pascal") {
list << "*.p{1,2}" << "*.pa[s345]";
}
else if ( type == "Perl") {
list << "*.p[lm]";
}
Expand All @@ -104,6 +113,12 @@ QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
else if ( type == "PHP") {
list << "*.php*";
}
else if ( type == "Qore") {
list << "*.q" << "*.qc" << "*.ql";
}
else if ( type == "Qorus") {
list << "*.qfd" << "*.qwf" << "*.qsd" << "*.qclass";
}
else if ( type == "Ruby") {
list << "*.rb";
}
Expand All @@ -113,18 +128,12 @@ QStringList FileTypeSettings::getFileNamePatterns(const QString& type) {
else if ( type == "TeX") {
list << "*.tex";
}
else if ( type == "TCL") {
list << "*.tcl";
}
else if ( type == "XML") {
list << "*.xml";
}
else if ( type == "Fortran") {
list << "*.f" << "*.f77" << "*.f90";
}
else if ( type == "Qore") {
list << "*.q" << "*.qc" << "*.ql";
}
else if ( type == "Qorus") {
list << "*.qfd" << "*.qwf" << "*.qsd" << "*.qclass";
}

return list;
}
Expand All @@ -143,6 +152,8 @@ QStringList FileTypeSettings::getFirstLinePatterns(const QString& type) {
list << "Index: *";
else if ( type == "HTML")
list << "<!doctype html*" << "<html*";
else if ( type == "Pascal")
list << "program *" << "unit *";
else if ( type == "Perl")
list << "*perl*";
else if ( type == "Python")
Expand Down

0 comments on commit 1f30102

Please sign in to comment.