首页>
外国专利>
Mechanism for reformatting a simple source code statement into a compound source code statement
Mechanism for reformatting a simple source code statement into a compound source code statement
展开▼
机译:将简单的源代码语句重新格式化为复合源代码语句的机制
展开▼
页面导航
摘要
著录项
相似文献
摘要
A mechanism for reformatting a simple source code statement into a compound source code statement is provided. Tokens are identified in unformatted source code, which contains simple statements. A syntax tree is created from the identified tokens. The syntax tree is used to identify one or more simple statements. In processing a particular simple statement, potential statements are identified in the particular simple statement. A tree of blocks, which identifies block levels, is created from the potential statements. An intermediate textual representation is created where each of the potential statements is on a different line. Indentation levels, which correspond to the block levels in the tree of blocks, are associated with each of the potential statements. Formatted source code is created by inserting begin and end block indicators into the intermediate textual representation.
展开▼