Microsoft MVP성태의 닷넷 이야기
COM : 3. ActiveScript의 문법 오류 검사 [링크 복사], [링크+제목 복사]
조회: 5913
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

Checking For Script Syntax Errors
; https://learn.microsoft.com/en-us/archive/blogs/ericlippert/checking-for-script-syntax-errors-this-time-with-code

가장 좋은 방법은 스크립트 전용 문법 검사기를 제공하는 3rd-party 제품을 이용하는 것이겠지만.

ParseScriptText를 이용해서도 맨 처음에 발생하는 문법 오류는 확인할 수 있습니다.
"맨 처음"이라는 제한을 없애기 위해서, 위의 댓글에 보면 문법 체크를 위한 별도의 jscript를 소개하고 있습니다. 좋아보이기는 한데... 한 가지 단점이 있습니다.
문법을 검사할 단위를 잘 쪼개서 eval에 넘겨야 하는데... 꼭 라인 하나당 적법한 문법이 오는 것이 아니니 별로 효용성은 없을 것 같은 생각이 듭니다. 단지, 그 정도의 기능이라면 전체 스크립트 문법을 검사하는 파서를 만드는 것보다는 "적법한 문법" 단위로 자르는 파서가 좀 더 쉽게 만들 수 있다는 정도겠지요.


[연관 글]






[최초 등록일: ]
[최종 수정일: 2/5/2023]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-동일조건변경허락 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.

비밀번호

댓글 작성자
 



2014-10-02 01시53분
정성태
2016-08-22 05시53분
정성태
2022-05-23 10시26분
Running JavaScript inside a .NET app with JavaScriptEngineSwitcher
;https://andrewlock.net/running-javascript-in-a-dotnet-app-with-javascriptengineswitcher/

microsoft/ClearScript
; https://github.com/Microsoft/ClearScript

A library for adding scripting to .NET applications. Supports V8 (Windows, Linux, macOS) and JScript/VBScript (Windows).

JavascriptNet/Javascript.Net
https://github.com/JavascriptNet/Javascript.Net
.Net bindings to the V8 JavaScript engine

A .NET library to parse and execute JavaScript code.
paulbartrum/jurassic
; https://github.com/paulbartrum/jurassic

Taritsyn/MsieJavaScriptEngine
; https://github.com/Taritsyn/MsieJavaScriptEngine

.NET wrapper for working with the JavaScript engines of Internet Explorer and Edge Legacy (JsRT versions of Chakra, ActiveScript version of Chakra and Classic JavaScript Engine). Project was based on the code of SassAndCoffee.JavaScript and Chakra Sample Hosts.
정성태

1  [2]  3  4  5  6  7  8 
NoWriterDateCnt.TitleFile(s)
173정성태4/12/201111214레지스트리 : 11. BHO를 IE와 탐색기에서 선택적으로 로드하고 싶다면?
172정성태4/1/201110167.NET : 44. ContextBoundObject
171정성태3/30/201110038.NET 4.0 : 1. ASP.NET WF4 / WCF and Async Calls
170정성태3/25/20119819.NET 3.0 : 5. WCF How To’s Index [2]
169정성태3/10/201111218.NET : 43. 열려진 소켓 포트를 소유한 Process ID 구하는 방법 [2]
165정성태10/20/201010816레지스트리 : 10. 탐색기의 특정 폴더에 대해 Webdev.WebServer40.exe 로 호스팅을 시작하는 메뉴 추가
164정성태10/11/201010070.NET : 42. Writing Windows Shell Extension with .NET Framework 4 (C#, VB.NET)
163정성태8/27/20108871.NET : 41. Writing Files from Low-Integrity Processes
162정성태8/24/20109036.NET : 40. Self STS
161정성태5/16/201011961.NET : 39. #SNMP - C# Based Open Source SNMP for .NET and Mono
160정성태5/11/20109004.NET : 38. How to get info from client certificates issued by a CA (C#)
159정성태4/30/20108871.NET : 37. How to write a VS2010 Extension using Statement Lambdas
158정성태12/20/200922834명령행 : 6. 배치 파일에서 현재 디렉터리 알아내는 방법 [1]
157정성태11/12/20099585.NET : 36. Dictionary<,> 개체 직렬화
156정성태11/10/200910743.NET : 35. UDP 패킷의 경유 IP 설정 (Source Routing)
155정성태11/4/20099378.NET : 34. MSDeploy 명령행에 대응되는 C# 코드 예제
154정성태7/13/20098914.NET 3.0 : 4. WCF - 연결 개체 닫기
153정성태6/29/20098287.NET : 33. Creating audio signals in .NET
152정성태1/6/20098913.NET 3.0 : 3. WPF - StatefulUserControlBase.cs
151정성태1/1/200911603.NET : 32. Wake-On-Lan C# 코드 [1]
150정성태12/12/20088260.NET 3.5 : 7. ETW / .NET Framework 3.5
149정성태12/3/20088697Win32 : 4. Using Windows Vista Built-In Double Buffering
148정성태11/25/20087644.NET : 31. ThreadPool.UnsafeQueueNativeOverlapped [1]
147정성태11/21/20086912.NET 3.5 : 6. ProcessGeneratedCode
146정성태10/29/20086810레지스트리 : 9. How to detect what .NET Framework X service pack is installed
145정성태5/6/20087057.NET : 30. XML Serializable Dictionary
1  [2]  3  4  5  6  7  8