Supercharge Your Innovation With Domain-Expert AI Agents!

Source code processing method and device

A processing method and source code technology, applied in the direction of program control devices, etc., can solve problems such as not being processed, and achieve the effect of improving the formatting effect

Inactive Publication Date: 2015-06-10
BEIJING FEINNO COMM TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In order to solve the problem that the source code processing method in the prior art only formats the code in the source code, but does not process the comments in the source code, the embodiment of the present invention provides a source code processing method and device

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Source code processing method and device
  • Source code processing method and device
  • Source code processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0052] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0053] Please refer to figure 1 , which shows a method flowchart of a source code processing method provided by an embodiment of the present invention. The source code processing method can be used to format comments in the source code. The source code processing method may include:

[0054] Step 101, obtaining the end position of the code in the single-line source code, the single-line source code includes code and comments corresponding to the code;

[0055] The method in this embodiment can be executed by a software development tool.

[0056] Step 102, determining the target starting position according to the preset minimum starting position and jumping step size and the end position of the code;

[0057]In this embodiment, the ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a source code processing method and a source code processing device and belongs to the field of software source code text processing. The method comprises the following steps: acquiring an end position of a code of a single-row source code, wherein the single-row source code comprises the code and annotation corresponding to the code; according to preset minimum initial position and hop step length and the end position of the code, determining a target initial position; moving an initial position of the annotation to the target initial position. By determining the target initial position according to the end position of the code, the minimum initial position and the hop step length and moving the initial position of the annotation to the target initial position, the method solves the problem that in a source code processing method in the prior art, only the code in the source doe is formatted, but the annotation in the source code is not processed, and achieves the aim of improving a formatting effect.

Description

technical field [0001] The invention relates to the field of software source code text processing, in particular to a source code processing method and device. Background technique [0002] In software development, due to differences in personal habits, the styles of source code written by different developers are also inconsistent. Therefore, in the development process, it is usually necessary to format the written source code to improve the readability and maintainability of the source code. [0003] In addition, for the convenience of reading and maintenance, the source code usually contains comments describing the function of the code. Similarly, the existing source code also has poor comment formatting effect and unfriendly interface, resulting in low readability and maintainability of the source code. Contents of the invention [0004] In order to solve the problem that the source code processing method in the prior art only formats the code in the source code, but...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/44
Inventor 周锐
Owner BEIJING FEINNO COMM TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More