bool CAsmFile::ParseBlockCMT() { // 扫描注释. SetCurLine(0); CWord* pWord = NULL; bool bCmt = false; do { // 寻找 / * while ((pWord = GetAllNextWord()) != NULL) { string& str = pWord->GetWord(); if (str == "/*") { bCmt = true; pWord->SetAttrib(EWORD_COMMENT); break; } } // 标记注释和结束符 while ((pWord = GetAllNextWord()) != NULL) { string& str = pWord->GetWord(); pWord->SetAttrib(EWORD_COMMENT); if (str == "*/") { bCmt = false; break; } } } while (pWord != NULL); return (bCmt == false); }
BOOL CItemList::OnLButtonDown(UINT flags, LPPOINT point, LPRECT prect ) { DWORD i = GetItem( point, prect ); // Select items SelectItem( i, TRUE, TRUE, ( GetKeyState( VK_CONTROL ) & 0x8000 ), ( GetKeyState( VK_SHIFT ) & 0x8000 ) != 0 ); // Set scroll information if ( i < m_dwPtr && m_pIndex[ i ] != NULL && ( m_pIndex[ i ]->flags & LIF_GROUP ) != 0 ) { // Validate max scroll line DWORD slm = GetScrollLineMax( prect ); DWORD cl = GetCurLine(); if ( cl > slm ) SetCurLine( slm ); } // end if // Punt if item clicked if ( i != MAXDWORD )return TRUE; // Are we clicking a header resize area? m_phii = GetHeader().GetHeaderResizeColumn( prect, point, m_lHScroll ); if ( m_phii != NULL ) { m_phiiwidth = m_phii->width; } // end if // Save click location m_lbuttondown.x = point->x; m_lbuttondown.y = point->y; return FALSE; }
bool CAsmFile::ParseLineCMT() { SetCurLine(0); CWord* pWord = NULL; do { bool bCmt = false; while ((pWord = GetLineNextWord()) != NULL) { string& str = pWord->GetWord(); if (str == "@") { bCmt = true; } if (bCmt) { pWord->SetAttrib(EWORD_COMMENT); } } } while (GetNextLine()); SetCurLine(0); do { bool bCmt = false; while ((pWord = GetLineNextWord()) != NULL) { string& str = pWord->GetWord(); if (str == "//") { bCmt = true; } if (bCmt) { pWord->SetAttrib(EWORD_COMMENT); } } } while (GetNextLine()); return true; }
bool CAsmFile::ParseKeyword() { SetCurLine(0); CWord* pWord = NULL; do { // bool bCmt = false; while ((pWord = GetLineNextWord()) != NULL) { if (pWord->GetAttrib() == EWORD_INIT) { pWord->SetAttrib(EWORD_KEYWORD); break; } } } while (GetNextLine()); return true; }