From eefb65bcb4404e9cc7bfb96313631d49d54f3dd8 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Wed, 12 Jan 2022 20:59:28 +0800 Subject: [PATCH] - fix: parser can't correctly handle variable definitions that don't have spaces like 'int*x'; - fix: parser can't correctly handle function parameters like 'int *x' --- NEWS.md | 2 + RedPandaIDE/RedPandaIDE_zh_CN.qm | Bin 110421 -> 110777 bytes RedPandaIDE/RedPandaIDE_zh_CN.ts | 938 ++++++++++++++-------------- RedPandaIDE/editor.cpp | 1 + RedPandaIDE/parser/cppparser.cpp | 46 +- RedPandaIDE/parser/cpptokenizer.cpp | 10 +- RedPandaIDE/parser/cpptokenizer.h | 1 + 7 files changed, 525 insertions(+), 473 deletions(-) diff --git a/NEWS.md b/NEWS.md index c5b976ab..c0b5ff65 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ Red Panda C++ Version 0.13.2 - fix: crash when refactor symbol and cursor is at the end of the identifier - fix: refactor symbol doesn't work for 1-length identifiers - enhancement: redirect stdio to a file while debugging ( must use gdb server mode to debug) + - fix: parser can't correctly handle variable definitions that don't have spaces like 'int*x'; + - fix: parser can't correctly handle function parameters like 'int *x' Red Panda C++ Version 0.13.1 - enhancement: suppoort localization info in project templates diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index 2c654303f435610e2deeb984f8c83d622bf0f98e..1961990820c1eb7881ed69bdc16eb584d01cd4df 100644 GIT binary patch delta 10340 zcmZviXFwBMw6@nyW+rWt*Z>7VEZ7C?f+*Mp6&ol;QA%i1lwy}C*tX75$rwbmZ*lnE!E3M*~&vxztZ(fvo@8lndh zFcoY8t_25!>%d9idJvy+Y2Ya^i&(#p;0I#v8;JNi#0KMce0QR`o<=fpnTfjJ;86Vi zFz8R@lw>5+Pu@ndu?hr4>QrO#Kcx3OtfETVn^5o zH(--try9=whqyP6L{I7y_alH<<2l63&ytk(o-zED*yyv~5%1WKD0`ieZ2a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iZ^9`Al?Q1T&MY6;DGQrQ!DBqdKaBm z-82Bho>tlx%@AO^*=Vh{Lc4#LXuI@>s*W$#cE1&f!9c9Gdj-~Ouh2TaUV!}cSnHY{ z1ZybMx_%yuifE;Fr0&~gB&r$OF&&|^C5^Q{P4GoPrFQb>>lj3@(S|LA$oyt$!}h}u z;`?c*=1#{D$6Y(EdOd!>Ks)EC8_|Y|+J&#Z(6`^wt~{HGmzrvAiUjxXIj>#QB@c=2 zqc*h_{I`plflL)=WGjhQSN8=AIcoeMVv#nZ77;e#h<1ZK9>bva+70b+Vp*_u(-zRi zLYt}Ij+2r$YuQ9NU@Ps8zOeh2leN3f9>(V(+7k;OqCZ%nJ=F;Z`ZB;kHYr4#-yZ(| zY>oD8O&$_dw6>Z>1F{ueA8qV6^{xHVS$}qemyL>py=E<1D-xCt7 z|E}1=%=C>iE%aBnhxY9l@yt(4z2oiOlPQD($$!Qo@~3zT`6I59t}GAw?5+;73t%g& p$84GZ3xS9T>ZgwG(bI!^x6p6Pv}U&YdYR3W!n2NtXR(pu{{VQuF_8cO diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.ts b/RedPandaIDE/RedPandaIDE_zh_CN.ts index 76d97719..a4eb5f43 100644 --- a/RedPandaIDE/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/RedPandaIDE_zh_CN.ts @@ -165,17 +165,17 @@ p, li { white-space: pre-wrap; } BacktraceModel - + Function 函数 - + Filename 文件名 - + Line @@ -221,37 +221,37 @@ p, li { white-space: pre-wrap; } BreakpointModel - + Filename 文件名 - + Line - + Condition 条件 - + Save file '%1' failed. 保存文件'%1'失败。 - + Can't open file '%1' for write. 无法写入文件'%1'. - + Error in json file '%1':%2 : %3 JSON文件'%1':%2中存在错误:%3 - + Can't open file '%1' for read. 无法读取文件'%1'. @@ -947,18 +947,18 @@ Are you really want to continue? CppRefacter - - + + Rename Symbol Error 重命名符号失败 - + Can't rename symbols not defined in this file. 无法重命名不在本文件中定义的符号 - + New symbol already exists! 新符号名称已被使用! @@ -1097,68 +1097,68 @@ Are you really want to continue? Debugger - + No compiler set 无编译器设置 - + No compiler set is configured. 没有配置编译器设置。 - + Can't start debugging. 无法启动调试器 - + Debugger path error 调试路径错误 - + Debugger's path "%1" contains non-ascii characters. 调试路径"%1"中包含非ASCII字符(如,中文字符) - - + + This prevents it from executing. 这会导致调试器无法启动。 - + Debugger not exists 找不到调试器 - + Can''t find debugger in : "%1" 找不到调试器程序"%1" - + GDB Server path error gdb server路径错误 - + GDB Server's path "%1" contains non-ascii characters. gdb server的路径"%1"包含中文或者全角字符 - + GDB Server not exists 找不到gdb server - + Can''t find gdb server in : "%1" 无法在"%1"找到gdb server - + Execute to evaluate 执行以求值 @@ -1167,22 +1167,22 @@ Are you really want to continue? 不在当前语境中 - + Compile 编译 - + Source file is more recent than executable. 源文件比程序文件新。 - + Recompile? 重新编译? - + Signal "%1" Received: 收到信号"%1": @@ -1247,40 +1247,40 @@ Are you really want to continue? 打印文档 - - - + + + Ctrl+click for more info Ctrl+单击以获取更多信息 - - + + Symbol '%1' not found! 未找到符号'%1'! - + astyle not found 找不到astyle程序 - + Can't find astyle in "%1". 找不到astyle程序"%1". - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Readonly 只读 @@ -2188,20 +2188,34 @@ Are you really want to continue? 运行程序的命令行参数 - + Redirect input to the following file: 将程序的标准输入重定向到下面的文件 - + + Debugger doesn't support this feature in Linux. + Linux下调试器不支持此功能。 + + + Note: + 说明: + + + + Debugger only support this feature in gdb server mode in windows. + Windows下调试器需启用gdb server模式支持此功能。 + + + + Browse 浏览 - Note: Debugger doesn't support this feature. - 注意:由于gdb的bug,调试时不支持该功能 + 注意:由于gdb的bug,调试时不支持该功能 @@ -3179,70 +3193,70 @@ Are you really want to continue? MainWindow - + Red Panda C++ 小熊猫C++ - - + - + - + + Issues 编译器 - + Compile Log 编译日志 - + File 文件 - + Tools 工具 + - Run 运行 - + Edit 编辑 - - + + Project 项目 - + Watch 监视 - + Structure 结构 - + Files 文件 @@ -3252,10 +3266,10 @@ Are you really want to continue? - + + - - + Debug 调试 @@ -3266,7 +3280,7 @@ Are you really want to continue? - + Debug Console 调试主控台 @@ -3286,50 +3300,50 @@ Are you really want to continue? 局部变量 - - - + + + Search 查找 - + History: 历史: - + Search Again 重新查找 - + Replace with: 替换为: - + Replace 替换 - + Close 关闭 - + Execute 运行 - - + + Code 代码 - + Window 窗口 @@ -3342,262 +3356,262 @@ Are you really want to continue? 工具栏2 - + New 新建 - + Ctrl+N Ctrl+N - + Open... 打开... - + Ctrl+O Ctrl+O - + Save 保存 - + Ctrl+S Ctrl+S - + Save As... 另存为... - + Save As 另存为 - + Save All 全部保存 - + Ctrl+Shift+S Ctrl+Shift+S - + Options 选项 - + + - - - + + Compile 编译 - + F9 F9 - + F10 F10 - + Undo 恢复 - + Ctrl+Z Ctrl+Z - + Redo 重做 - + Ctrl+Y Ctrl+Y - + Cut 剪切 - + Ctrl+X Ctrl+X - - - + + + Copy 复制 - + Ctrl+C Ctrl+C - - + + Paste 粘贴 - + Ctrl+V Ctrl+V - - + + Select All 选择全部 - + Ctrl+A Ctrl+A - + Indent 缩进 - + UnIndent 取消缩进 - + Toggle Comment 切换注释 - + Ctrl+/ Ctrl+/ - + Collapse All 全部收起 - + Uncollapse All 全部展开 - + Encode in ANSI 使用ANSI编码 - + Encode in UTF-8 使用UTF-8编码 - + Auto Detect 自动检测 - + Convert to ANSI 转换为ANSI编码 - + Convert to UTF-8 转换为UTF-8编码 + - Compile & Run 编译运行 - + F11 F11 + - Rebuild All 全部重编译 - + F12 F12 - + Stop Execution 停止执行 - + F6 F6 - + F5 F5 - + Step Over 单步跳过 - + F7 F7 - + Step Into 单步进入 - - + + Problem Set 试题集 - + New Problem Set 新建试题集 @@ -3616,14 +3630,14 @@ Are you really want to continue? - + Save Problem Set 保存试题集 - + Load Problem Set 载入试题集 @@ -3639,500 +3653,500 @@ Are you really want to continue? 地址表达式: - + Cancel 取消 - - + + TODO TODO - - + + Bookmark 书签 - - - - + + + + Problem 试题 + - Add Probem Case 添加试题案例 + - Remove Problem Case Remove Problem Set 删除试题集 + - Open Anwser Source File 打开答案源代码文件 + - Run All Cases Run Current Case 运行所有案例 - + Problem Cases Validation Options 测试案例验证选项 - + %v/%m %v/%m - + Output 输出 - + Input 输入 - + Expected 期望输出 - + Help 帮助 - + Refactor 重构 - + View 视图 - + Tool Windows 工具窗口 - + Main 主工具栏 - + Compiler Set 编译器配置集 + - New Source File 新建源代码文件 - + Tab Tab - + Shift+Tab Shift+Tab - + F8 F8 - + Step Out 单步跳出 - + Ctrl+F8 Ctrl+F8 - + Run To Cursor 执行到光标处 - + Ctrl+F5 Ctrl+F5 - + Continue 继续执行 - + F4 F4 - + Add Watch... 添加监视 - + View CPU Window... 打开CPU信息窗口... - + Exit 退出 - + Find... 查找... - + Ctrl+F Ctrl+F - + Find in Files... 在文件中查找... - + Ctrl+Shift+F Ctrl+Shift+F - + Replace... 替换 - + Ctrl+R Ctrl+R - + Find Next 查找下一个 - + F3 F3 - + Find Previous 查找前一个 - + Shift+F3 Shift+F3 - + Remove Watch 删除监视值 - + Remove All Watches Remove All 删除全部监视值 - + Modify Watch... 修改监视值 - + Reformat Code 对代码重新排版 - + Ctrl+Shift+A Ctrl+Shift+A - + Go back 前一次编辑位置 - + Ctrl+Alt+Left Ctrl+Alt+Left - + Forward 后一次编辑位置 - + Ctrl+Alt+Right Ctrl+Alt+Right - + Ctrl+W Ctrl+W - + Close All 全部关闭 - + Ctrl+Shift+W Ctrl+Shift+W - + Maximize Editor 最大化编辑器 - + Ctrl+F11 Ctrl+F11 - + Next 下一窗口 - + Ctrl+Tab Ctrl+Tab - + Previous 前一窗口 - + Ctrl+Shift+Tab Ctrl+Shift+Tab - + Toggle breakpoint 切换断点 - + Ctrl+F4 Ctrl+F4 - - + + Clear all breakpoints 删除所有断点 - + Breakpoint property... 设置断点条件... - + Goto Declaration 跳转到声明处 - + Goto Definition 跳转到定义处 - + Find references 查找符号的引用 - + Open containing folder 打开所在的文件夹 - + Ctrl+B Ctrl+B - + Open a terminal here 打开命令行窗口 - + File Properties... 文件属性... - + Close Project 关闭项目 - + Project options 项目属性 - + New Project... 新建项目... - + New File 新建项目文件 - + Add to project... 添加到项目... - + Remove from project 从项目删除 - + View Makefile 查看Makefile - + Clean 清理构建文件 - + Open Folder in Explorer 在浏览器中打开 - + Open In Terminal 在终端中打开 - + About 关于 - - + + Rename Symbol 重命名符号 - + Shift+F6 Shift+F6 - + Print... 打印... - + Ctrl+P Ctrl+P - - + + Export As RTF 导出为RTF - - + + Export As HTML 导出为HTML - + Move To Other View 移动到其他视图 - + Ctrl+M Ctrl+M + - C++ Reference C++参考手册 - + C Reference C参考手册 - + Tool Window Bars 工具窗口栏 - + Status Bar 状态栏 - + Ctrl+Backspace Ctrl+Backspace - + Interrupt 中断 @@ -4141,47 +4155,47 @@ Are you really want to continue? 插入行 - + Delete Line 删除当前行 - + Ctrl+D Ctrl+D - + Duplicate Line 复制当前行 - + Ctrl+E Ctrl+E - + Delete Word 删除当前单词 - + Ctrl+Shift+D Ctrl+Shift+D - + Delete to EOL 删除到行尾 - + Ctrl+Del Ctrl+Del - + Delete to BOL 删除到行首 @@ -4190,78 +4204,78 @@ Are you really want to continue? C/C++参考 - + EGE Manual EGE图形库手册 - + Add Bookmark 添加书签 - + Remove Bookmark 删除书签 - + Modify Bookmark Description 修改书签说明 - + Locate in Files View 在文件视图中定位 - - + + Open Folder 打开文件夹 - + Running Parameters... 运行参数... - + File Encoding 文件编码 - + Recent Files 文件历史 - - + - + + Debugging 正在调试 - - + - + + Running 正在运行 - - + - + + Compiling 正在编译 @@ -4270,193 +4284,193 @@ Are you really want to continue? 行:%1 列:%2 已选择:%3 总行数:%4 总长度:%5 - + Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5 Line: %1 Col: %2 Selected: %3 Lines: %4 Length: %5 行: %1 列: %2 已选择 :%3 总行数: %4 总长度: %5 - + Read Only 只读 - + Insert 插入 - + Overwrite 覆写 - + Close project 关闭项目 - + Are you sure you want to close %1? 你确定要关闭'%1'吗? - - + + Confirm 确认 - - - + + + Source file is not compiled. 源文件尚未编译。 - - + + Compile now? 现在编译? - - + + Source file is more recent than executable. 源文件比可执行程序新。 - + Recompile now? 重新编译? - + No compiler set 无编译器设置 - + No compiler set is configured. 没有配置编译器设置。 - + Can't start debugging. 无法启动调试器 - - + + Enable debugging 启用调试参数 - - + + You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now? 当前编译设置中未启用调试选项(-g3),或启用了信息剥除选项(-s)<br /><br/>是否纠正这一问题? - + Project not built 项目尚未构建 - + Project hasn't been built. Build it now? 项目尚未构建。是否构建? - + Host applcation missing 宿主程序不存在 - + DLL project needs a host application to run. 动态链接库(DLL)需要一个宿主程序来运行。 - + But it's missing. 但它不存在。 - + Host application not exists 宿主程序不存在 - + Host application file '%1' doesn't exist. 宿主程序'%1'不存在。 - + Recompile? 重新编译? - - + + Save last open info error 保存上次打开信息失败 - + Can't remove old last open information file '%1' 无法删除旧上次打开信息文件'%1' - + Can't save last open info file '%1' 无法保存上次打开信息文件'%1' - + Load last open info error 载入上次打开信息失败 - + Can't load last open info file '%1' 无法载入上次打开信息文件'%1' - + Open Source File 打开源代码文件 - + Show detail debug logs 显示详细调试器日志 - + Copy all 全部复制 - - + + Clear 清除 - + Export 导出 - + Insert Snippet 插入代码段 - - + + Problem Set %1 试题集%1 @@ -4477,68 +4491,68 @@ Are you really want to continue? 或者选择使用其他的网络端口。 - - + + Rebuild Project 重新构建项目 - - + + Project has been modified, do you want to rebuild it? 项目已经被修改过,是否需要重新构建? - + Auto Save Error 自动保存出错 - + Auto save "%1" to "%2" failed:%3 自动保存"%1"到"%2"失败:%3 - + Properties... 试题属性... - + Set Problem Set Name 设置试题集名称 - + Problem Set Name: 试题集名称: - + Remove 删除 - + Remove All Bookmarks 删除全部书签 - + Modify Description 修改描述 - - - + + + Bookmark Description 书签描述 - - - + + + Description: 描述: @@ -4547,240 +4561,240 @@ Are you really want to continue? 在调试主控台中显示调试器输出 - + Remove this search 清除这次搜索 - + Clear all searches 删除所有搜索 - + Breakpoint condition... 断点条件... - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Remove All Breakpoints Remove all breakpoints 删除所有断点 - + Remove Breakpoint 删除当前断点 - + Rename File 重命名文件 - - + + Add Folder 添加文件夹 - + New folder 新文件夹 - + Folder name: 文件夹: - + Rename Folder 重命名 - + Remove Folder 删除文件夹 - + Sort By Type 按类型排序 - + Sort alphabetically 按名称排序 - + Show inherited members 显示继承的成员 - + Goto declaration 跳转到声明处 - + Goto definition 跳转到定义处 - + Open in Editor 在编辑器中打开 - + Open in External Program 使用外部程序打开 - + Open in Terminal 在终端中打开 - + Open in Windows Explorer 在Windows浏览器中打开 - + Character sets 字符集 - + %1 files autosaved 已自动保存%1个文件 - + Set answer to... 设置答案源代码... - + select other file... 选择其他文件... - + Select Answer Source File 选择答案源代码文件 - + C/C++Source Files (*.c *.cpp *.cc *.cxx) C/C++Source Files (*.c *.cpp *.cc *.cxx C/C++源代码文件 (*.c *.cpp *.cc *.cxx) - + Save project 保存项目 - + The project '%1' has modifications. 项目'%1'有改动。 - - + + Do you want to save it? 需要保存吗? - - + + File Changed 文件已发生变化 - + New Project File? 新建项目文件? - + Do you want to add the new file to the project? 您是否要将新建的文件加入项目? - - - - + + + + Save Error 保存失败 - + Change Project Compiler Set 改变项目编译器配置集 - + Change the project's compiler set will lose all custom compiler set options. 改变项目的编译器配置集会导致所有的自定义编译器选项被重置。 - + Do you really want to do that? 你真的想要做那些吗? - + Do you really want to clear all breakpoints in this file? 您真的要清除该文件的所有断点吗? - + New project 新建项目 - + Close %1 and start new project? 关闭'%1'以打开新项目? - + Folder not exist 文件夹不存在 - + Folder '%1' doesn't exist. Create it now? 文件夹'%1'不存在。是否创建? - + Can't create folder 无法创建文件夹 - + Failed to create folder '%1'. 创建文件夹'%1'失败。 - + Save new project as @@ -4789,222 +4803,222 @@ Are you really want to continue? 小熊猫Dev-C++项目文件 (*.dev) - + New project fail 新建项目失败 - + Can't assign project template 无法使用模板创建项目 - + Remove file 删除文件 - + Remove the file from disk? 同时从硬盘上删除文件? - + untitled 无标题 - + New Project File Name 新的项目文件名 - + File Name: 文件名: - + File Already Exists! 文件已存在! - + File '%1' already exists! 文件'%1'已经存在! - + Add to project 添加到项目 - + Red Panda C++ project file (*.dev) 小熊猫C++项目文件(*.dev) - + Rename Error 重命名出错 - + Symbol '%1' is defined in system header. 符号'%1'在系统头文件中定义,无法修改。 - + New Name 新名称 - - + + Replace Error 替换出错 - + Can't open file '%1' for replace! 无法打开文件'%1'进行替换! - + Contents has changed since last search! 内容和上次查找时不一致。 - + Rich Text Format Files (*.rtf) RTF格式文件 (*.rtf) - + HTML Files (*.html) HTML文件 (*.html) - + The current problem set is not empty. 当前的试题集不是空的。 - + Problem %1 试题%1 - - + + Problem Set Files (*.pbs) 试题集文件 (*.pbs) - + Load Error 载入失败 - - + + Problem Case %1 试题案例%1 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + Error 错误 - + Recent Projects 项目历史 - + File '%1' was changed. 磁盘文件'%1'已被修改。 - + Reload its content from disk? 是否重新读取它的内容? - + File '%1' was removed. 磁盘文件'%1'已被删除。 - + Keep it open? 是否保持它在小熊猫C++中打开的编辑窗口? - + Open 打开 - + Compile Failed 编译失败 - + Run Failed 运行失败 - - + + Confirm Convertion 确认转换 - - + + The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue? 当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗? - + New Watch Expression 新监视表达式 - + Enter Watch Expression (it is recommended to use 'this->' for class members): 输入监视表达式 - + Parsing file %1 of %2: "%3" (%1/%2)正在解析文件"%3" - - + + Done parsing %1 files in %2 seconds 完成%1个文件的解析,用时%2秒 - + (%1 files per second) (每秒%1个文件) @@ -6548,12 +6562,12 @@ Are you really want to continue? RegisterModel - + Register 寄存器 - + Value @@ -6967,7 +6981,7 @@ Are you really want to continue? 自动链接 - + @@ -7043,15 +7057,15 @@ Are you really want to continue? 杂项 - - + + Program Runner 程序运行 - + Problem Set 试题集 @@ -7469,49 +7483,49 @@ Are you really want to continue? WatchModel - + Save file '%1' failed. 保存文件'%1'失败。 - + Can't open file '%1' for write. 无法写入文件'%1'. - + Error in json file '%1':%2 : %3 JSON文件'%1':%2中存在错误:%3 - - + + Execute to evaluate 执行以求值 - - + + Not Valid 在当前作用域中无效 - + Can't open file '%1' for read. 无法读取文件'%1'. - + Expression 表达式 - + Type 类型 - + Value diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 80c54e7e..3f48c23c 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -2609,6 +2609,7 @@ void Editor::showCompletion(const QString& preWord,bool autoComplete) } else if ( (tokenType != SynHighlighterTokenType::Symbol) && (tokenType != SynHighlighterTokenType::Space) && + (tokenType != SynHighlighterTokenType::Keyword) && (tokenType != SynHighlighterTokenType::Identifier) ) { return; diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 4dd91712..75e42e6c 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -4329,20 +4329,40 @@ void CppParser::scanMethodArgs(const PStatement& functionStatement, const QStrin // SpacePos := LastPos(' ', Copy(S, BracePos, MaxInt)) // start search at brace // end else begin // } - int spacePos = s.lastIndexOf(' '); // Cut up at last space - if (spacePos >= 0) { - args = ""; - int bracketPos = s.indexOf('['); - if (bracketPos >= 0) { - args = s.mid(bracketPos); - s.truncate(bracketPos); + //skip [] + int varEndPos = s.length()-1; + int bracketLevel = 0; + while (varEndPos>=0) { + switch(s[varEndPos].unicode()) { + case ']': + bracketLevel++; + break; + case '[': + bracketLevel--; + varEndPos--; + break; } + if (bracketLevel==0) + break; + varEndPos--; + } + int varStartPos = varEndPos; + if (varEndPos>=0) { + while (varStartPos-1>=0) { + if (!mTokenizer.isIdentChar(s[varStartPos-1])) + break; + varStartPos--; + } + } + if (varStartPos>=0) { + if (varEndPos+1definitionLine, @@ -4352,6 +4372,14 @@ void CppParser::scanMethodArgs(const PStatement& functionStatement, const QStrin true, false); } + if (varStartPos= 0) { + args = s.mid(bracketPos); + s.truncate(bracketPos); + } + } paramStart = i + 1; // step over , } i++; diff --git a/RedPandaIDE/parser/cpptokenizer.cpp b/RedPandaIDE/parser/cpptokenizer.cpp index 933fbad7..61084112 100644 --- a/RedPandaIDE/parser/cpptokenizer.cpp +++ b/RedPandaIDE/parser/cpptokenizer.cpp @@ -268,8 +268,9 @@ QString CppTokenizer::getWord(bool bSkipParenthesis, bool bSkipArray, bool bSkip // Get next word... QChar* offset = mCurrent; + mCurrent++; // Copy the word ahead of us - while (isLetterChar(*mCurrent) || isDigitChar(*mCurrent)) + while (isIdentChar(*mCurrent) || isDigitChar(*mCurrent)) mCurrent++; QString currentWord; @@ -582,6 +583,11 @@ void CppTokenizer::skipToNextToken() advance(); } +bool CppTokenizer::isIdentChar(const QChar &ch) +{ + return ch.isLetter(); +} + void CppTokenizer::advance() { switch(mCurrent->unicode()) { @@ -634,7 +640,7 @@ bool CppTokenizer::isLetterChar(const QChar &ch) { // return (ch>= 'A' && ch<='Z') // || (ch>='a' && ch<='z') - return ch.isLetter() + return isIdentChar(ch) || ch == '_' || ch == '*' || ch == '&' diff --git a/RedPandaIDE/parser/cpptokenizer.h b/RedPandaIDE/parser/cpptokenizer.h index db42901e..7ac73b64 100644 --- a/RedPandaIDE/parser/cpptokenizer.h +++ b/RedPandaIDE/parser/cpptokenizer.h @@ -37,6 +37,7 @@ public: const TokenList& tokens(); PToken operator[](int i); int tokenCount(); + bool isIdentChar(const QChar& ch); private: void addToken(const QString& sText, int iLine); void advance();