找到不平衡的大括号和括号 [英] Finding unbalanced braces and parentheses

查看:187
本文介绍了找到不平衡的大括号和括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gcc 4.6.0
GNU Emacs 23.2.1



我有一些c代码,在某种程度上我一定是打错了。现在我留下不平衡的卷曲或括号。



我有大约2000行代码,我只是想知道有什么技巧找到它们吗? p>

Emacs有一些很好的功能,所以我只是想知道有什么办法可以扫描代码,告诉我他们在哪里。目前我有一个与此相关的编译错误。



非常感谢任何建议,

解决方案

在emacs中,您可以使用 Mx check-parens 。请参阅 http://www.gnu.org/software/libtool/manual/ emacs / Parentheses.html


gcc 4.6.0 GNU Emacs 23.2.1

I have some c code and at some point I must have made a typing mistake. And now I am left with unbalanced curly braches or a parentheses.

I have about 2000 lines of code and I am just wondering is there any technique for finding them?

Emacs has some good features, so I am just wondering is there any way it can scan the code and tell me where they are. Currently I have a compile error related to this.

Many thanks for any suggestions,

解决方案

In emacs you can use M-x check-parens . See http://www.gnu.org/software/libtool/manual/emacs/Parentheses.html

这篇关于找到不平衡的大括号和括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆