Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured Text language support #2311

Merged
merged 5 commits into from Apr 12, 2020
Merged

Conversation

@Serhioromano
Copy link
Contributor

@Serhioromano Serhioromano commented Apr 12, 2020

New PR with clean Prism fork

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Two more things and we can merge this.

components.json Outdated Show resolved Hide resolved
components/prism-iecst.js Outdated Show resolved Hide resolved
components/prism-iecst.js Outdated Show resolved Hide resolved
Serhioromano and others added 2 commits Apr 12, 2020
Co-Authored-By: Michael Schmidt <mitchi5000.ms@googlemail.com>
@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 12, 2020

You are obviously good at Regex. Although mine regex works, I see how your suggestions are better. I've learned some new things today.еhank you for taking the time and explaining your changes.

@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 12, 2020

Again! What now? I cannot find errors. It was all green. After you request changes, I resolve them all but it always continues to show that I have one change request.

What do I do not? I did not do anything, just changed the language name and accepted your proposals.

@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 12, 2020

🥺 Accept it already!!

@maddie
Copy link

@maddie maddie commented Apr 12, 2020

Hmm, some of the comments seem to be missed by the regex:

image

Code:

PROGRAM PLC_PRG
VAR
	iSize: INT;(*发送数据的组数*)
	sTritonDataSend: TritonDataSend;		(*发送的数据的结构体,结构体中发送数据的结构体中的szKey和szValue长度均为64个字节(由于内存长度限制)*)
	sTritonDataRecv: TritonDataRecv;(*从Neptune获取的数据*)
	itriton_status: INT;			(*获取和Neptune连接状态*)
	aTempKey: ARRAY [0..99] OF string;
	aTempNote: ARRAY [0..99] OF string;
	strJsonData: ARRAY [0..9] OF JsonDataString;
	struuid: STRING;				(*获取Triton配置的设备序列号*)
	intuuid: ARRAY [0..99] OF BYTE;	(*获取设备*)
	(*
	  需要在<数据类型>中定义以下结构体:
	  TYPE JsonDataString :
        STRUCT
        szKey:STRING;
        szValue:STRING;
        END_STRUCT
      END_TYPE
	*)
	loop: WORD := 1000; (* 1000ms给一次实时数据 *)
	rt: INT;(*调用接口函数返回值*)
	i: INT := 1;
	Delay: TON;
	irandom: INT;
	baction_done: BOOL;

END_VAR

EDIT: I guess it could be because of the whitespace before the opening bracket are tabs instead of spaces.

EDIT 2: Never mind. It's the brackets. They were Chinese symbols 😂

@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Apr 12, 2020

🥺 Accept it already!!

We are basically there already. Just some formatting and I'll merge this.

@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 12, 2020

iSize: INT;(发送数据的组数)
sTritonDataSend: TritonDataSend; (发送的数据的结构体,结构体中发送数据的结构体中的szKey和szValue长度均为64个字节(由于内存长度限制))
sTritonDataRecv: TritonDataRecv;(从Neptune获取的数据)
itriton_status: INT; (获取和Neptune连接状态
aTempKey: ARRAY [0..99] OF string;
aTempNote: ARRAY [0..99] OF string;
strJsonData: ARRAY [0..9] OF JsonDataString;
struuid: STRING; (获取Triton配置的设备序列号
intuuid: ARRAY [0..99] OF BYTE; (获取设备
(*
需要在<数据类型>中定义以下结构体:
TYPE JsonDataString :
STRUCT
szKey:STRING;
szValue:STRING;
END_STRUCT
END_TYPE
*)

Somehow the ( is not a bracket. You can even see it in the code it is different. I change it to bracket and it works.

@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 12, 2020

🥺 Accept it already!!

We are basically there already. Just some formatting and I'll merge this.

So what else should I do?

@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Apr 12, 2020

This.

@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Apr 12, 2020

Btw. the is a "FULLWIDTH LEFT PARENTHESIS". I don't think ST supports this, does it?

@RunDevelopment RunDevelopment merged commit 8704cdf into PrismJS:master Apr 12, 2020
1 check passed
@RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Apr 12, 2020

Thank you for contributing @Serhioromano!

@Serhioromano
Copy link
Contributor Author

@Serhioromano Serhioromano commented Apr 13, 2020

Btw. the is a "FULLWIDTH LEFT PARENTHESIS". I don't think ST supports this, does it?

No it doesn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants